fit_null_glm_Binary_SPA: Fit generalized linear model under the null hypothesis for...

View source: R/fit_null_glm_Binary_SPA.R

fit_null_glm_Binary_SPAR Documentation

Fit generalized linear model under the null hypothesis for imbalanced case-control unrelated samples.

Description

The fit_null_glm_Binary_SPA function is a wrapper of the glm function from the stats package that fits a regression model under the null hypothesis for imbalanced case-control unrelated samples, which provides the preliminary step for subsequent variant-set tests in whole genome sequencing data analysis. See glm for more details.

Usage

fit_null_glm_Binary_SPA(fixed, data, family = binomial(link = "logit"), ...)

Arguments

fixed

an object of class formula (or one that can be coerced to that class): a symbolic description of the fixed effects model to be fitted.

data

a data frame or list (or object coercible by as.data.frame to a data frame) containing the variables in the model.

family

a description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (See family for details of family functions). Can be either "gaussian" for continuous phenotype or "binomial" for binary phenotype.

...

additional arguments that could be passed to glm.

Value

The function returns an object of the model fit from glm (obj_nullmodel), with additional elements indicating the samples are unrelated (obj_nullmodel$relatedness = FALSE), and indicating the samples are under imbalanced case-control design (obj_nullmodel$use_SPA = TRUE). See glm for more details.

References

Dey, R., et al. (2017). A fast and accurate algorithm to test for binary phenotypes and its application to PheWAS. The American Journal of Human Genetics, 101(1), 37-49. (pub)


xihaoli/STAAR documentation built on Jan. 27, 2024, 8:51 a.m.