Get_UV_from_data: Compute the summary statistics given the individual-level...

Description Usage Arguments Value Author(s) References Examples

View source: R/sumstats.R

Description

This function allows you to calculate the score summary statistics U and their covariance matrix V for MTAR, given the traits, covariates and genotype data sets. If one trait only takes no more than two values, this function will treat this trait as a binary trait.

Usage

1
Get_UV_from_data(traits, covariates, genotype, covariance = TRUE)

Arguments

traits

a numeric list, each sublist containing trait information for each study. In each study, a numeric n \times K matrix with each row as an independent individual and each column as a separate trait. If subject i is without trait k, the corresponding value is set as NA. The number of traits in each study can be different but the names of traits are required.

covariates

a numeric list, each sublist containing covariates information for each study. In each study, a numeric n \times D matrix with each row as an independent individual and each column as a covariate.

genotype

a numeric list, each sublist containing genotype information for each study. In each study, a numeric n \times m matrix with each row as an independent individual and each column as a SNP Each genotype should be coded as 0, 1, 2, and NA for AA, Aa, aa, and missing, where A and a represents a major and minor allele, respectively. The number of SNPs in each study can be different but the names of SNPs are required. Also, the number of studies must be the same in genotype, covariates and traits lists. The order of subject ID must be the same among traits, covariates, and genotype within each study.

covariance

a logical value indicating whether to calculate the covariance matrix of score summary statistics U. The default value is TRUE. If covariance is set as FALSE, then only the diagonal values of the covairance matrix are calculated, which is faster. In estimating the zeta matrix correcting for overlap samples, we recommend set covariance as FALSE in calculating the summary statistics for common variants. Since the number of common variants may be large and time-consuming.

Value

A list containing summary statistics for each trait. If covariance is TRUE, the score summary statistics U and its covariance matrix V are returned. Otherwise, only U and the diagonal elements of covariance matrix are returned.

Author(s)

Lan Luo

References

Hu, Y.J., Berndt, S.I., Gustafsson, S., Ganna, A., Mägi, R., Wheeler, E., Feitosa, M.F., Justice, A.E., Monda, K.L., Croteau-Chonka, D.C. and Day, F.R., 2013. Meta-analysis of gene-level associations for rare variants based on single-variant statistics. The American Journal of Human Genetics, 93(2), pp.236-248.

Tang, Z.Z. and Lin, D.Y., 2015. Meta-analysis for discovering rare-variant associations: statistical methods and software programs. The American Journal of Human Genetics, 97(1), pp.35-53.

Examples

1
2
3
4
5
6
7
8
data(rawdata)
attach(rawdata)
obs.stat <- Get_UV_from_data(traits = traits.dat,
                             covariates = cov.dat,
                             genotype = geno.dat,
                             covariance = TRUE)
obs.stat
detach(rawdata)

MTAR documentation built on April 23, 2020, 1:05 a.m.