Description Usage Arguments Value Examples
Computes score test statistics for testing whether each of a large number of coefficients (typically corresponding to genetic markers) in a GLM with canonical link is zero in presence of a smaller number of covariates (typically environmental covariates), and provides estimates of correlations between the test statistics.
1 |
formula |
Model |
xg |
Matrix of genetic markers (one column for each marker). |
maxorder |
Maximal order of which correlations of score test statistics are estimated. |
family |
Family of GLM passed to |
both |
If |
A list containing the following components:
statistic |
A vector of score test statistics |
corrs |
A list of vectors of correlations of
score test statistics. The first component is a vector of first-order
correlations, i.e. between neighbouring markers, the second is a vector of
second-order correlations, i.e. between markers of distance 2, etc. The
number of components is |
corrmatrix |
Estimated
correlation matrix of the score test statistics. The matrix is generated if
|
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Normal model with three environmental covariates:
result <- scorestatcorr(y_normal ~ sex + activity + agecategory, xg, 2)
result$statistic[1:10]
result$corrs[[1]][1:10]
pvals <- 2*pnorm(-abs(result$statistic)) # p-values for two-sided test
pvals[1:10]
# Logistic model without environmental covariates:
resultl <- scorestatcorr(y_logistic ~ 1, xg, 2, family = binomial)
resultl$statistic[1:10]
resultl$corrs[[1]][1:10]
pvalsl <- 2*pnorm(-abs(resultl$statistic))
pvalsl[1:10]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.