Title: | Pleiotropy Test for Multiple Traits on a Genetic Marker |
---|---|
Description: | Perform tests for pleiotropy of multiple traits of various variable types on genotypes for a genetic marker. |
Authors: | Daniel J Schaid |
Maintainer: | Jason Sinnwell <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.9 |
Built: | 2024-11-06 03:26:28 UTC |
Source: | https://github.com/cran/pleio |
A simulated dataset with 3 y variables simulated from multivariate normal with common correlation structure, correlation of 0.5. The traits are (1) gaussian, (2) binomial, and (3) ordinal. Genotypes were simulated based on minor allele frequency of 0.2, and assume that the 3 traits are not asssociated with dose of minor allele (all 3 betas = 0).
data("pleio.demo")
data("pleio.demo")
y is a data.frame with 500 observations and 3 traits, whose distribution families are gaussian, binomial, and ordinal, respectively; x is a matrix of 5 covariates, geno is a single SNP of dosage of a minor allele simulated from frequency of 0.2.
data(pleio.demo) str(y) table(geno) x[1:5,]
data(pleio.demo) str(y) table(geno) x[1:5,]
Pre-compute statisics for testing pleiotropy, to be used in pleio.glm.test and pleio.glm.sequential
pleio.glm.fit(y, g, glm.family, x.all=NULL, x.index.list=NULL)
pleio.glm.fit(y, g, glm.family, x.all=NULL, x.index.list=NULL)
y |
matrix of multiple traits to test for pleiotropy on genotype vector. Rows are for subjects and columns are for traits. |
g |
vector of genotypes coded as dosage of a minor allele, 0,1, and 2. Allows imputed genotype dosage. |
glm.family |
vector of strings corresponding to the type of phenotype for the columns of y. Types accepted are gaussian, binomial, and ordinal. |
x.all |
matrix of all covariates traits to adjust for the traits. |
x.index.list |
a list of vectors containing the index of the columns of x.all for which to be adjusted for each trait. The list must have the same number of vectors as there are traits in y. If one trait has no covarites, specify a vector containing 0 for that trait. |
The matrix y of traits is expected to have rows for subjects and columns for traits. The number of rows of y should match the length of vector g. If adjusting traits by covarites in x.all, the x.index.list must be a list containing a vector of indices of the columns of x.all for each trait. If one trait does not have covariates and others do, then the vector for the trait with no covariate must be a vector containing the number 0. This function computes intermediate statistics that are subsequently used to test various hypotheses about pleiotropy. For technical details, Schaid et al. (2016, 2017)
A list containing
theta |
|
n.intercepts |
|
n.coef.covar |
|
n.parm |
|
an.mat |
|
n.traits |
number of traits (columns) in y |
Dan Schaid, Jason Sinnwell.
Schaid DJ, Tong X, Larrabee B, Kennedy RB, Poland GA, Sinnwell JP. Statistical Methods for Testing Genetic Pleiotropy. Genetics. 2016 Oct;204(2):483-497.
Schaid DJ, Tong X, Batzler A, Sinnwell JP, Qing J, Biernacka JM. Multivariate Generalized Linear Model for Genetic Pleiotropy. Under review.
Perform sequential tests of pleiotropy to determine the number of traits, and which traits, are associatd with a vector of genotypes.
pleio.glm.sequential(obj.pleio.glm.fit, pval.threshold)
pleio.glm.sequential(obj.pleio.glm.fit, pval.threshold)
obj.pleio.glm.fit |
result of pleio.glm.fit |
pval.threshold |
p-value for rejecting the null hypothesis of the specified number of coefficients constrained to be zero. |
Perform sequential tests of pleiotropy, starting at the usual multivarite null hypothesis that all coefficients = 0. If this test rejects because the p-value < pval.threshold, then allow one coefficient to be non-zero in order to test whether the remaining coefficients = 0. If the test of one non-zero coefficient rejects, then allow two non-zero coefficients, considering all possible combinations of two non-zero coefficients and test whether the remaining coefficients = 0. Continue this sequential testing until the p-value for a test is greater than the specific pval.threshold. The step at which the p-value > pval.threshold determines which traits are associated with the genotype. If there are m traits, the sequential testing stops either when p-value > pval.threshold, or when (m-1) traits are tested. If the p-value remains less than pval.threshold when testing (m-1) traits, this implies that all m traits are associated with the genotype.
A list containing:
pval |
p-value of the final test from the sequential testing |
count |
the number of nonzero coefficients |
index.nonzero.coef |
index of column(s) of y that have non-zero coefficients. These indices indicate which traits are associated with the genotype, accounting for the correlations among the traits. |
Dan Schaid and Jason Sinnwell
Schaid DJ, Tong X, Larrabee B, Kennedy RB, Poland GA, Sinnwell JP. Statistical Methods for Testing Genetic Pleiotropy. Genetics. 2016 Oct;204(2):483-497.
Schaid DJ, Tong X, Batzler A, Sinnwell JP, Qing J, Biernacka JM. Multivariate Generalized Linear Model for Genetic Pleiotropy. Under review.
data(pleio.demo) ## test without covars fams <- c("gaussian","binomial","ordinal") obj <- pleio.glm.fit(y, geno, glm.family=fams) stat <- pleio.glm.test(obj, count.nonzero.coef = 0) stat$stat stat$pval pseq <- pleio.glm.sequential(obj, pval.threshold=.5) pseq
data(pleio.demo) ## test without covars fams <- c("gaussian","binomial","ordinal") obj <- pleio.glm.fit(y, geno, glm.family=fams) stat <- pleio.glm.test(obj, count.nonzero.coef = 0) stat$stat stat$pval pseq <- pleio.glm.sequential(obj, pval.threshold=.5) pseq
Perform single test of the number of traits associated with a genotype, by allowing a specified number of regression beta's to be unconstrained.
pleio.glm.test(obj.pleio.glm.fit, count.nonzero.coef = 0)
pleio.glm.test(obj.pleio.glm.fit, count.nonzero.coef = 0)
obj.pleio.glm.fit |
result of pleio.glm.fit |
count.nonzero.coef |
Number of non-zero coefficients (betas). A non-zero beta is allowed to be unconstrained, while all other beta's are constrained to be zero. |
By specifying the number of non-zero coefficients, the algorithm evaluates all possible ways of choosing unconstrained and constrained betas, and for each configuration a statistic (tk) is computed. This tk statistic can be considered a measure of fit of a model. The minimum tk over all possible configurations provides a global test of whether one of the models fits well.
A list containing:
stat |
global test statistic |
df |
degrees of freedom of the statistic |
pval |
p-value for the test |
index.nonzero.coef |
index of the non-zero coefficients that provide the minimum tk goodness of fit statistic - this configuration is assumed to have coefficients for all other indices equal to zero. |
tk |
test testistic for the tests performed on trait combinations in vk.set |
vk.set |
data.frame containing the tests performed. For m traits, and k = count.nonzero.coef, there are m-choose-k tests considered in the null hypothesis. The data.frame provides the indices of the unconstrained coefficients for the corresponding tk test statistic for the configuration. Rows are the indices for each configuration, and the columns are for the different configurations tested. |
Dan Schaid and Jason Sinnwell
Schaid DJ, Tong X, Larrabee B, Kennedy RB, Poland GA, Sinnwell JP. Statistical Methods for Testing Genetic Pleiotropy. Genetics. 2016 Oct;204(2):483-497.
data(pleio.demo) obj <- pleio.glm.fit(y, geno, glm.family=c("gaussian","binomial","ordinal")) test1 <- pleio.glm.test(obj, count.nonzero.coef = 0) test1 test2 <- pleio.glm.test(obj, count.nonzero.coef = 1) test2
data(pleio.demo) obj <- pleio.glm.fit(y, geno, glm.family=c("gaussian","binomial","ordinal")) test1 <- pleio.glm.test(obj, count.nonzero.coef = 0) test1 test2 <- pleio.glm.test(obj, count.nonzero.coef = 1) test2
Pre-compute statisics for testing pleiotropy, to be used in pleio.q.test and pleio.q.sequential. This is an earlier function for gaussian traits without covariates. The function pleio.glm.fit is more general, allowing for gaussian traits, and possibly adjusting covariates.
pleio.q.fit(y, geno)
pleio.q.fit(y, geno)
y |
matrix of multiple quantitative traits to test for pleiotropy on genotype vector. Rows are for subjects and columns are for traits. |
geno |
vector of genotypes coded as dosage of a minor allele, 0,1,2. Allows imputed genotype dosage. |
The matrix y of traits is expected to have rows for subjects and columns for traits. The number of rows of y should match the length of vector geno. This function computes intermediate statistics that are subsequently used to test various hypotheses about pleiotropy. For technical details, Schaid et al. (Genetics, 2016)
A list containing
x |
the de-correlated genotype design matrix |
xx.inv |
inverse of x'x |
beta.ols |
estimated unconstrained beta coefficients for y traits based on ordinary least squares |
n.traits |
number of traits (columns) in y |
Dan Schaid, Jason Sinnwell.
Schaid DJ, Tong X, Larrabee B, Kennedy RB, Poland GA, Sinnwell JP. Statistical Methods for Testing Genetic Pleiotropy. Genetics. 2016 Oct;204(2):483-497.
Perform sequential tests of pleiotropy to determine the number of traits, and which traits, are associatd with a vector of genotypes. For gaussian traits without covariates.
pleio.q.sequential(obj.fit, pval.threshold)
pleio.q.sequential(obj.fit, pval.threshold)
obj.fit |
result of pleio.q.fit |
pval.threshold |
p-value for rejecting the null hypothesis of the specified number of non-zero betas. |
Perform sequential tests of pleiotropy, starting at the usual multivarite null hypothesis that all coefficients = 0. If this test rejects because the p-value < pval.threshold, then allow one coefficient to be non-zero in order to test whether the remaining coefficients = 0. If the test of one non-zero coefficient rejects, then allow two non-zero coefficients, considering all possible combinations of two non-zero coefficients and test whether the remaining coefficients = 0. Continue this sequential testing until the p-value for a test is greater than the specific pval.threshold. The step at which the p-value > pval.threshold determines which traits are associated with the genotype. If there are m traits, the sequential testing stops either when p-value > pval.threshold, or when (m-1) traits are tested. If the p-value remains less than pval.threshold when testing (m-1) traits, this implies that all m traits are associated with the genotype.
A list containing:
pval |
p-value of the final test from the sequential testing |
index.beta |
index of columns of y that have non-zero betas. These indices indicate which traits are associated with the genotype, accounting for the correlations among the traits. |
Dan Schaid and Jason Sinnwell
Schaid DJ, Tong X, Larrabee B, Kennedy RB, Poland GA, Sinnwell JP. Statistical Methods for Testing Genetic Pleiotropy. To appear in Genetics, 2016.
data(pleio.qdemo) fit <- pleio.q.fit(y, geno) test.seq <- pleio.q.sequential(fit, pval.threshold=.05) test.seq
data(pleio.qdemo) fit <- pleio.q.fit(y, geno) test.seq <- pleio.q.sequential(fit, pval.threshold=.05) test.seq
Perform single test of the number of traits associated with a genotype, by allowing a specified number of regression beta's to be unconstrained.
pleio.q.test(obj.fit, count.nonzero.beta = 0)
pleio.q.test(obj.fit, count.nonzero.beta = 0)
obj.fit |
result of pleio.q.fit |
count.nonzero.beta |
Number of non-zero betas. A non-zero beta is allowed to be unconstrained, while all other beta's are constrained to be zero. |
By specifying the number of non-zero beta's, the algorithm evaluates all possible ways of choosing unconstrained and constrained beta's, and for each configuration a statistic (tk) is computed. This tk statistic can be considered a measure of fit of a model. The minimum tk over all possible configurations provides a global test of whether one of the models fits well.
A list containing:
stat |
global test statistict |
df |
degrees of freedom of the statistic |
pval |
p-value for the test |
index.nonzero.beta |
index of the non-zero beta(s) that provide(s) the minimum tk goodness of fit statistic - this configuration is assumed to have beta's for all other indices equal to zero. |
tests |
data.frame containing the tests performed. For m traits, and k = count.nonzero.beta, there are m-choose-k tests considered in the null hypothesis. The data.frame provides the indices of the unconstrained betas and the corresponding tk test statistic for the configuration. |
Dan Schaid and Jason Sinnwell
Schaid DJ, Tong X, Larrabee B, Kennedy RB, Poland GA, Sinnwell JP. Statistical Methods for Testing Genetic Pleiotropy. Genetics. 2016 Oct;204(2):483-497.
data(pleio.qdemo) fit <- pleio.q.fit(y, geno) ## usual multivariate test of whether all betas = 0 test0 <- pleio.q.test(fit, count.nonzero.beta = 0) test0 ## test whether allowing 2 betas to be non-zero fits data test2 <- pleio.q.test(fit, count.nonzero.beta = 2) test2
data(pleio.qdemo) fit <- pleio.q.fit(y, geno) ## usual multivariate test of whether all betas = 0 test0 <- pleio.q.test(fit, count.nonzero.beta = 0) test0 ## test whether allowing 2 betas to be non-zero fits data test2 <- pleio.q.test(fit, count.nonzero.beta = 2) test2
A simulated dataset with 6 y variables simulated from multivariate normal distribution with common correlation structure, correlation of 0.5, and genotypes simulated based on minor allele frequency of 0.2, and assume that betas for traits 2 and 3 have non-zero values, while all other traits are not asssociated with dose of minor allele.
data("pleio.qdemo")
data("pleio.qdemo")
y is a data.frame with 500 observations (rows) and 6 quantitative traits (columns), while geno is a single SNP of dosage of a minor allele, simulated from frequency of 0.2.
data(pleio.qdemo) str(y) table(geno)
data(pleio.qdemo) str(y) table(geno)