Description Usage Arguments Value See Also Examples
This function generates correlated score statistics by permutation.
1 | perm_score(Y, X, binary = FALSE, cov = NULL, nperm = 1000, seed = NULL)
|
Y |
Phenotype data. It can be a continuous trait or a binary trait. A vector or length n (number of subjects). |
X |
Genotype data. A matrix with dimensions n (number of subjects) by K (number of variants). If elements within a column of X are identical, this column needs to be removed ahead. |
binary |
Indicator of whether Y is binary. |
cov |
Covariates. A matrix with dimensions n (number of subjects) by J (number of covariates). |
nperm |
Number of permutations. Default is 1,000. |
seed |
Specify seed for permutations. |
A list object.
Score statistics. The first column contains the original data.
P-values of two-tailed score tests; can be further used by wAF_combine function.
Left-side P-values of one-tailed score tests; can be further used by wAF_combine, wAFd_combine functions.
1 2 3 4 5 6 7 8 9 10 11 | # binary trait
Y <- RV_dense$trait
X <- RV_dense$SNV[, -RV_dense$zero_var]
result <- perm_score(Y, X, binary = TRUE, nperm = 100)
names(result)
# continuous trait
Y <- SNV_sparse$trait
X <- SNV_sparse$SNV[, -SNV_sparse$zero_var]
result <- perm_score(Y, X, nperm = 100)
names(result)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.