Description Usage Arguments Value Examples
None
1 2 3 4 5 6 7 8 | longskat_snp_test(r.model,
snp,
weights.common = c(0.5, 0.5),
weights.rare = c(1, 25),
snp.impute = "mean",
rare.cutoff = NULL,
run.cpp = F,
verbose = FALSE )
|
r.model |
The list object obtained from the function |
snp |
Matrix with m row for individuals and n columns for the variaints(SNPs), also with the individuals' ID as the row names. |
weights.common |
a numeric vector of parameters of beta weights for common variants (default=c(0.5,0.5)). |
weights.rare |
a numeric vector of parameters of beta weights for rare variants (default=c(1,25)). |
rare.cutoff |
Numeric, a value of MAF cutoff for the rare SNPs. Only SNPs that have MAFs smaller than this are considered as rare SNP. The default criterion of rare SNP is calculated by the formula 1/√{2*sample} |
run.cpp |
Logical, indicating whether C/C++ functions are used to compute LSKAT. |
verbose |
Logical variable, indicating whether some debug information can be outputted. |
None
1 2 3 4 5 6 7 8 9 10 11 12 | ## data simulation for the power test
p0 <- longskat_gene_simulate( plink.format=F, power.test=T, n.gene=1);
## model estimation
r.model <- longskat_est_model( p0$phe.long, p0$phe.cov, g.maxiter=3, verbose=T);
for(i in 1:NCOL(p0$snp.mat[[1]]))
{
## test all SNPs in the 1st gene.
r.lskat <- longskat_snp_test(r.model, p0$snp.mat[[1]][,i]);
print(r.lskat);
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.