R/prep_mytab.R
prep_X_list.Rd
Create a list of component X matrices for input to stagger_mats, to ultimately create design matrix
prep_X_list(indices, start_snp, probs, covariates)
indices | a vector of integers |
---|---|
start_snp | an integer denoting the index (within genotype probabilities array) where the scan should start |
probs | a three-dimensional array of genotype probabilities for a single chromosome |
covariates | a matrix of covariates |
a list of design matrices, ultimately useful when constructing the (multi-locus) design matrix
pp <- array(rbinom(n = 200, size = 1, prob = 0.5), dim = c(10, 2, 10)) prep_X_list(1:3, 1, probs = pp, covariates = NULL)#> [[1]] #> [,1] [,2] #> [1,] 0 1 #> [2,] 0 0 #> [3,] 1 0 #> [4,] 0 1 #> [5,] 0 1 #> [6,] 0 1 #> [7,] 0 0 #> [8,] 1 1 #> [9,] 0 0 #> [10,] 0 0 #> #> [[2]] #> [,1] [,2] #> [1,] 1 0 #> [2,] 0 0 #> [3,] 0 0 #> [4,] 1 1 #> [5,] 1 0 #> [6,] 1 0 #> [7,] 0 1 #> [8,] 0 1 #> [9,] 0 1 #> [10,] 0 1 #> #> [[3]] #> [,1] [,2] #> [1,] 1 1 #> [2,] 0 0 #> [3,] 0 1 #> [4,] 1 0 #> [5,] 0 1 #> [6,] 0 1 #> [7,] 0 1 #> [8,] 1 1 #> [9,] 1 0 #> [10,] 0 0 #>