Description Usage Arguments Value
View source: R/EMM_functions_cpp.R
Calculte -log10(p) by score test (fast, for limited cases)
1 2 3 4 5 6 7 8 9 10 | score.linker.cpp(
y,
Ws,
Gammas,
gammas.diag = TRUE,
Gu,
Ge,
P0,
chi0.mixture = 0.5
)
|
y |
A n \times 1 vector. A vector of phenotypic values should be used. NA is allowed. |
Ws |
A list of low rank matrices (ZW; n \times k matrix). This forms linear kernel ZKZ' = ZW Γ (ZW)'. For example, Ws = list(A.part = ZW.A, D.part = ZW.D) |
Gammas |
A list of matrices for weighting SNPs (Gamma; k \times k matrix). This forms linear kernel ZKZ' = ZW Γ (ZW)'. For example, if there is no weighting, Gammas = lapply(Ws, function(x) diag(ncol(x))) |
gammas.diag |
If each Gamma is the diagonal matrix, please set this argument TRUE. The calculation time can be saved. |
Gu |
A n \times n matrix. You should assign ZKZ', where K is covariance (relationship) matrix and Z is its design matrix. |
Ge |
A n \times n matrix. You should assign identity matrix I (diag(n)). |
P0 |
A n \times n matrix. The Moore-Penrose generalized inverse of SV0S, where S = X(X'X)^{-1}X' and V0 = σ^2_u Gu + σ^2_e Ge. σ^2_u and σ^2_e are estimators of the null model. |
chi0.mixture |
RAINBOW assumes the statistic l1' F l1 follows the mixture of χ^2_0 and χ^2_r, where l1 is the first derivative of the log-likelihood and F is the Fisher information. And r is the degree of freedom. chi0.mixture determins the proportion of χ^2_0 |
-log10(p) calculated by score test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.