glmmHeritability {SAIGEgds} | R Documentation

## Heritability estimation

### Description

Get the heritability estimate from the SAIGE model.

### Usage

    glmmHeritability(modobj, adjust=TRUE)

### Arguments

`modobj` | an R object for SAIGE model parameters
`adjust` | if `TRUE` and binary outcomes, uses adjusted tau estimate for the heritability estimation

### Details

In SAIGE, penalized quasi-likelihood (PQL) is used to estimate the variance component parameter tau. It is known to produce biased estimate of the variance component tau using PQL. If `adjust=TRUE` for binary outcomes, tau is adjusted based prevalence and observed tau using the data in Supplementary Table 7 (Zhou et al. 2018) to reduce the bias of PQL estimate of variance component.

### Value

Return a liability scale heritability.

### Author(s)

Xiuwen Zheng

### See Also

`seqFitNullGLMM_SPA`

### Examples

    # open a GDS file
    fn <- system.file("extdata", "grm1k_10k_snp.gds", package="SAIGEgds")
    gdsfile <- seqOpen(fn)

    # load phenotype
    phenofn <- system.file("extdata", "pheno.txt.gz", package="SAIGEgds")
    pheno <- read.table(phenofn, header=TRUE, as.is=TRUE)
    head(pheno)

    # fit the null model
    glmm <- seqFitNullGLMM_SPA(y ~ x1 + x2, pheno, gdsfile, trait.type="binary")

    glmmHeritability(glmm)

    seqClose(gdsfile)

[Package SAIGEgds version 1.8.1 Index]