Learn R Programming

RVFam (version 1.1)

glmm.EC: function for testing a single/pooled variant for continuous traits with family data using generalized linear mixed effects model

Description

Fit generalized linear mixed effects model (GLMM) with logistic link that treats each pedigree as a cluster to test a single/pooled variant for associations against a continuous phenotype with family data. The glmer function from package lme4 is used.

Usage

glmm.EC(snp,phen,test.dat,covar,chr)

Arguments

snp
a numeric vector with genotype of a single/pooled variant
phen
a character string for the phenotype name of a binary trait of interest in test.dat
test.dat
the product of merging phenotype, genotype and pedigree data, should be ordered by "famid"
covar
a character vector for covariates in test.dat
chr
chromosome number

Value

ntotal
number of individuals with genotype, phenotype and covariates
nmiss
number of individuals with missing genotype among ntotal
maf_ntotal
minor allele frequency based on ntotal
beta
regression coefficient of single SNP test or burden test
se
standard error of beta
Z
Z statistic based on signed LRT
remark
additional information of the analysis
p
LRT p-value of a single variant test or burden test
MAC
minor allele count
n0
the number of individuals with 0 copy of coded alleles
n1
the number of individuals with 1 copy of coded alleles
n2
the number of individuals with 2 copies of coded alleles

Details

The glmm.EC function fits a generalized linear mixed effects model (GLMM) with logistic link that treats each pedigree as a cluster to test association between a binary trait and a single/pooled genetic variant with additive model. The trait-variant association test is carried out by the glmer function from package lme4. P-value from likelihood ratio test (LRT) is reported. This function is called in glmm.ped function to test all single/pooled variants.

References

Bates D, Maechler M, Bolker B and Walker S (2014). lme4: Linear mixed-effects models using Eigen and S4. R package version 1.1-7, http://CRAN.R-project.org/package=lme4.

Examples

Run this code
## Not run: 
# glmm.EC(snp=rsnps.dat[,"snp1"],phen="disease",test.dat=rsnps.dat,
# covar=c("sex"),chr=1)
# ## End(Not run)

Run the code above in your browser using DataLab