Learn R Programming

GRAB (version 0.2.2)

SAGELD.NullModel: Fit a SAGELD Null Model

Description

Fit a SAGELD Null Model

Usage

SAGELD.NullModel(
  NullModel,
  UsedMethod = "SAGELD",
  PlinkFile,
  SparseGRMFile,
  PairwiseIBDFile,
  PvalueCutoff = 0.001,
  control = list()
)

Value

A SAGELD null model object

Arguments

NullModel

A fitted null model object from either lme4::lmer() or glmmTMB::glmmTMB(). This model should include the phenotype, environmental variable, covariates, and random effects structure.

UsedMethod

A character string specifying the method to use. Options are "SAGELD" (default) for gene-environment interaction analysis, or "GALLOP" for analysis using only unrelated samples.

PlinkFile

A character string specifying the path to PLINK files (without file extensions like ".bed", ".bim", or ".fam"). Used to read genotype data for calculating lambda values in gene-environment interaction models.

SparseGRMFile

A character string specifying the path to a sparse genetic relationship matrix (GRM) file. This file should be generated using the getSparseGRM() function and contain three columns: 'ID1', 'ID2', and 'Value'.

PairwiseIBDFile

A character string specifying the path to a pairwise identity-by-descent (IBD) file. This file should be generated using the getPairwiseIBD() function and contain five columns: 'ID1', 'ID2', 'pa', 'pb', and 'pc'.

PvalueCutoff

A numeric value (default: 0.001) specifying the p-value cutoff for marginal genetic effect on the environmental variable. Used to filter SNPs when calculating lambda values for gene-environment interaction models.

control

A list of control parameters for the null model fitting process. Available options include: