Description Usage Arguments Details Value Note Examples
Fit a factor model of dimension d for binomial data. Returns logistic factors.
1 |
X |
a matrix of SNP genotypes, i.e. an integer matrix of 0's, 1's, and 2's. Sparse matrices of class Matrix are not supported (yet). |
d |
number of logistic factors, including the intercept |
adjustments |
a matrix of adjustment variables to hold fixed during estimation. |
override |
optional boolean to bypass Lanczos bidiagonalization SVD. Usually not advised unless encountering a bug in the SVD code. |
safety |
optional boolean to bypass checks on the genotype matrices, which require a non-trivial amount of computation. |
This function performs logistic factor analysis on SNP data. As it stands, we follow the convention where d=1 is intercept only, and for d>1 we compute d-1 singular vectors and postpend the intercept.
matrix of logistic factors, with the intercept at the end.
Genotype matrix is expected to be a matrix of integers with values 0, 1, and 2. Note that the coding of the SNPs does not affect the algorithm.
1 2 3 | LF <- lfa(hgdp_subset, 4)
dim(LF)
head(LF)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.