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

View source: R/fit_null_glm.R

fit_null_glmR Documentation

Fit generalized linear model under the null hypothesis for unrelated samples.

Description

The fit_null_glm function is a wrapper of the glm function from the stats package that fits a regression model under the null hypothesis for 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(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 an additional element indicating the samples are unrelated (obj_nullmodel$relatedness = FALSE). See glm for more details.


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