GRAB performs two-step genetic association testing. This function
implements the first step: fitting a null model and preparing the dataset required for
downstream marker-level (GRAB.Marker) and region-level (GRAB.Region) analyses.
GRAB.NullModel(
formula,
data,
subjIDcol = NULL,
subjData = NULL,
method,
traitType,
GenoFile = NULL,
GenoFileIndex = NULL,
SparseGRMFile = NULL,
control = NULL,
...
)An S3 object with class "{method}_NULL_Model". All returned objects contain the following elements:
Sample size (integer).
Character vector of subject IDs included in analysis.
Original function call.
R session and package information.
Analysis completion timestamp (character).
List of control parameters used in fitting.
This object serves as input for GRAB.Marker or GRAB.Region.
See method-specific documentation for additional elements included in the returned object.
(formula) Formula with response variable(s) on the left and covariates on the right. Do not include an intercept (added automatically). For SPAmix with traitType "Residual", multiple response variables (separated by "+") are supported.
(data.frame) Data frame containing response variables and covariates in the formula.
Parameter "subset" is deprecated. All subjects with phenotype data will be used. Missing values
should be coded as NA. Other values (e.g., -9, -999) are treated as numeric.
(character or NULL) Column name in data containing subject IDs.
(character vector or NULL) Subject IDs aligned with rows of data.
Exactly one of subjIDcol or subjData must be provided.
(character) Supported methods:
"POLMM": Ordinal traits. See ?GRAB.POLMM.
"SPACox": Time-to-event or Residual. See ?GRAB.SPACox.
"SPAmix": Time-to-event or Residual. See ?GRAB.SPAmix.
"WtCoxG": Time-to-event traits. See ?GRAB.WtCoxG.
(character) Supported: "ordinal", "time-to-event", and "Residual".
(character or NULL) Path to genotype file. Supported formats determined by extension:
PLINK: "prefix.bed"
BGEN: "prefix.bgen" (version 1.2 with 8-bit compression)
(character vector or NULL) Associated files for the genotype file (auto-detected if NULL):
PLINK: c("prefix.bim", "prefix.fam")
BGEN: c("prefix.bgen.bgi", "prefix.sample") or c("prefix.bgen.bgi")
(character or NULL) Path to a sparse GRM file. The file must be whitespace-delimited with three columns in the order:
Column 1: Subject ID 1
Column 2: Subject ID 2
Column 3: Genetic correlation between the two subjects
See system.file("extdata", "SparseGRM.txt", package = "GRAB") for an example.
See ?getSparseGRM for details on generating a sparse GRM.
(list or NULL) List of additional, less commonly used parameters. See the corresponding method documentation for available options and defaults.
Additional method-specific parameters.