lfa | R Documentation |
Fit logistic factor model of dimension d
to binomial data.
Computes d - 1
singular vectors followed by intercept.
lfa( X, d, adjustments = NULL, override = FALSE, safety = FALSE, rspectra = FALSE, ploidy = 2, tol = .Machine$double.eps, m_chunk = 1000 )
X |
A matrix of SNP genotypes, i.e. an integer matrix of 0's,
1's, 2's and |
d |
Number of logistic factors, including the intercept |
adjustments |
A matrix of adjustment variables to hold fixed during
estimation. Number of rows must equal number of individuals in |
override |
Optional boolean passed to |
safety |
Optional boolean to bypass checks on the genotype
matrices, which require a non-trivial amount of computation.
Ignored if |
rspectra |
If |
ploidy |
Ploidy of data, defaults to 2 for bi-allelic unphased SNPs |
tol |
Tolerance value passed to |
m_chunk |
If |
Genotype matrix should have values in 0, 1, 2, or NA
.
The coding of the SNPs (which case is 0 vs 2) does not change the output.
The matrix of logistic factors, with individuals along rows and factors along columns. The intercept appears at the end of the columns, and adjustments in the beginning if present.
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.