SPAGE_Null_Model: Get parameters and residuals from the NULL model

Description Usage Arguments Value Examples

View source: R/fit-null.R

Description

Fit a covariates-only model to compute model parameters and residuals for SPAGE.

Usage

1
SPAGE_Null_Model(formula, subjectID, data = NULL, out_type = "D")

Arguments

formula

an object of class “formula”: a symbolic description of the Covariates-Only model to be fitted.

subjectID

a character vector to specify the subject IDs. When calculating SPAGE p-value, the subjects IDs will be used to match genotype and environmental exposure information.

data

an optional data frame containing the variables in the model (default=NULL). If it is NULL, the variables are taken from 'environment(formula)'

out_type

an indicator of the outcome type. "D" for the dichotomous outcome.

Value

an R object to pass to function SPAGE for GxE analyses.

Examples

1
2
3
Data.ls = data.simu.null(N = 1000, nSNP = 10, nCov = 2, maf = 0.3, prev = 0.1)
Phen.mtx = Data.ls$Phen.mtx
obj.null = SPAGE_Null_Model(y~Cov1+Cov2, data=Phen.mtx, out_type="D")

WenjianBI/SPAGE documentation built on Nov. 13, 2020, 12:15 p.m.