smt {AssocTests} | R Documentation |
Single-marker test
Description
Conduct the single-marker test in an association study to test for the association between the genotype at a biallelic marker and a trait.
Usage
smt(
y,
g,
covariates = NULL,
min.count = 5,
missing.rate = 0.2,
y.continuous = FALSE
)
Arguments
y |
a numeric vector of the observed trait values in which
the ith element is for the ith subject. The elements
could be discrete ( |
g |
a numeric vector of the observed genotype values ( |
covariates |
an optional data frame, list or environment
containing the covariates used in the model. The default is |
min.count |
a critical value to decide which method is used
to calculate the p-value when the trait is discrete and |
missing.rate |
the highest missing value rate of the genotype
values that this function can tolerate. The default is |
y.continuous |
logical. If |
Details
Single-marker analysis is a core in many gene-based or pathway-based procedures, such as the truncated p-value combination and the minimal p-value.
Value
smt
returns a list with class "htest
".
If y is continuous, the list contains the following components:
statistic | |||
the observed value of the test statistic. | |||
p.value | |||
the p-value for the test. | |||
alternative | |||
a character string describing the alternative hypothesis. | |||
method | |||
a character string indicating the type of test performed. | |||
data.name | |||
a character string giving the names of the data. | |||
sample.size | |||
a vector giving the numbers of the subjects with the genotypes 0 , 1 , and 2 (n0 , |
|||
n1 , and n2 , respectively).
|
If y is discrete, the list contains the following components:
statistic | |||
the observed value of the test statistic. | |||
p.value | |||
the p-value for the test. | |||
alternative | |||
a character string describing the alternative hypothesis. | |||
method | |||
a character string indicating the type of test performed. | |||
data.name | |||
a character string giving the names of the data. | |||
sample.size | |||
a vector giving | |||
the number of subjects with the trait value 1 and the genotype 0 (r0 ), |
|||
the number of subjects with the trait value 1 and the genotype 1 (r1 ), |
|||
the number of subjects with the trait value 1 and the genotype 2 (r2 ), |
|||
the number of subjects with the trait value 0 and the genotype 0 (s0 ), |
|||
the number of subjects with the trait value 0 and the genotype 1 (s1 ), |
|||
and the number of subjects with the trait value 0 and the genotype 2 (s2 ). |
|||
bad.obs | |||
a vector giving the number of missing genotype values with the trait value 1 |
|||
(r.miss ), the number of missing genotype values with the trait value 0 |
|||
(s.miss ), and the total number of the missing genotype values (n.miss ).
|
Author(s)
Lin Wang, Wei Zhang, and Qizhai Li.
References
Lin Wang, Wei Zhang, and Qizhai Li. AssocTests: An R Package for Genetic Association Studies. Journal of Statistical Software. 2020; 94(5): 1-26.
Examples
y <- rep(c(0, 1), 25)
g <- sample(c(0, 1, 2), 50, replace = TRUE)
smt(y, g, covariates = NULL, min.count=5,
missing.rate=0.20, y.continuous = FALSE)