Learn R Programming

GRAB (version 0.2.3)

GRAB.SPAGRM: SPAGRM method in GRAB package

Description

SPAGRM method is an empirical approach to analyzing complex traits (including but not limited to longitudinal trait) for related samples in a large-scale biobank. SPAGRM extend SPACox to support an related populations.

Usage

GRAB.SPAGRM()

Arguments

Value

No return value, called for side effects (prints information about the SPAGRM method to the console).

Details

Additional list of control in SPAGRM.NullModel() function.

Additional list of control in GRAB.Marker() function.

Examples

Run this code
# Step 2a: process model residuals
ResidMatFile <- system.file("extdata", "ResidMat.txt", package = "GRAB")
SparseGRMFile <- system.file("extdata", "SparseGRM.txt", package = "GRAB")
PairwiseIBDFile <- system.file("extdata", "PairwiseIBD.txt", package = "GRAB")
obj.SPAGRM <- SPAGRM.NullModel(
  ResidMatFile = ResidMatFile,
  SparseGRMFile = SparseGRMFile,
  PairwiseIBDFile = PairwiseIBDFile,
  control = list(ControlOutlier = FALSE)
)

# Step 2b: perform score test
GenoFile <- system.file("extdata", "simuPLINK.bed", package = "GRAB")
OutputDir <- tempdir()
OutputFile <- file.path(OutputDir, "SPAGRMMarkers.txt")
GRAB.Marker(
  objNull = obj.SPAGRM,
  GenoFile = GenoFile,
  OutputFile = OutputFile
)
head(read.table(OutputFile, header = TRUE))

Run the code above in your browser using DataLab