Formula with response variable(s) on left and covariates on right. Intercept added automatically. For SPAmix with traitType="Residual", multiple response variables separated by + are supported.
data
data.frame
Data frame containing response variables and covariates. Missing values coded as NA.
method
character
Method to use: "POLMM", "SPACox", "SPAmix", "SPAGRM", or "WtCoxG".
traitType
character
Trait type: "ordinal", "time-to-event", or "Residual".
GenoFile¹
character
Path to genotype file. Required for POLMM and WtCoxG. Extensions: .bed (PLINK) or .bgen (BGEN v1.2 with 8-bit).
subjIDcol²
character
Column name in data containing subject IDs.
subjData²
character or numeric vector
Vector of subject IDs aligned with the rows of data.
RefAfFile³
character
Path to reference allele frequency file with columns: CHROM, POS, ID, REF, ALT, AF_ref, AN_ref.
RefPrevalence³
numeric
Population-level disease prevalence for weighting. Range: (0, 0.5).
¹ GenoFile is required only for POLMM and WtCoxG.
² Exactly one of subjIDcol and subjData must be provided.
³ RefAfFile and RefPrevalence are WtCoxG specific.
Optional Parameters
Parameter
Type
Default
Description
GenoFileIndex
character vector
NULL
Index files for genotype file. Auto-detected if NULL. For PLINK: c("prefix.bim", "prefix.fam"). For BGEN: c("prefix.bgen.bgi", "prefix.sample").
SparseGRMFile
character
NULL
Path to sparse GRM file. Tab-delimited with 3 columns: ID1, ID2, Value.
control
list
NULL
Control parameters. See below; optional unless marked as required.
Control Parameters (optional unless marked as required)
POLMM Control Parameters
Parameter
Type
Default
Description
memoryChunk
numeric
2
Memory chunk size for computation (GB); must be > 0.
seed
integer
-1
Random seed (-1 = no seed set).
tracenrun
integer
30
Number of runs for trace calculation; must be > 0.
maxiter
integer
100
Maximum iterations for model fitting; must be > 0.
tolBeta
numeric
0.001
Convergence tolerance for beta estimates; must be > 0.
tolTau
numeric
0.002
Convergence tolerance for tau estimates; must be > 0.
tau
numeric
0.2
Initial variance component value; must be > 0.
maxiterPCG
integer
100
Maximum iterations for preconditioned conjugate gradient (PCG); must be > 0.
tolPCG
numeric
1e-6
Tolerance for PCG convergence; must be > 0.
showInfo
logical
FALSE
Print PCG iteration information for debugging.
maxiterEps
integer
100
Maximum iterations for epsilon estimation; must be > 0.
tolEps
numeric
1e-10
Tolerance for epsilon estimation; must be > 0.
minMafVarRatio
numeric
0.1
Minimum MAF for variance ratio estimation; range [0, 0.5].
maxMissingVarRatio
numeric
0.1
Maximum missing rate for variance ratio estimation; range [0, 1].
nSNPsVarRatio
integer
20
Number of SNPs for variance ratio estimation; must be > 0.
CVcutoff
numeric
0.0025
Coefficient of variation cutoff; must be > 0.
grainSize
integer
1
Grain size for parallel processing; must be > 0.
minMafGRM
numeric
0.01
Minimum MAF for GRM construction; range [0, 0.5].
maxMissingGRM
numeric
0.1
Maximum missing rate for GRM construction; range [0, 1].
SPACox Control Parameters
Parameter
Type
Default
Description
range
numeric vector
c(-100, 100)
Range for SPA grid; must be symmetric (i.e., range[2] = -range[1]).
length.out
integer
10000
Number of grid points for SPA approximation; must be > 1000.
SPAmix Control Parameters
Parameter
Type
Default
Description
PC_columns
character
Required
Comma-separated column names of principal components (e.g., "PC1,PC2,PC3"). Must be in formula.
OutlierRatio
numeric
1.5
IQR multiplier for outlier detection; must be > 0. Outliers defined as outside [Q1 - r×IQR, Q3 + r×IQR].
WtCoxG Control Parameters
Parameter
Type
Default
Description
OutlierRatio
numeric
1.5
IQR multiplier for outlier detection; must be > 0.
SPAGRM.NullModel
Required Parameters
Parameter
Type
Description
ResidMatFile
data.frame or character
Data frame or file path with columns SubjID, Resid. Tab/space-delimited if file.
SparseGRMFile
character
Path to sparse GRM file. Tab-delimited with 3 columns: ID1, ID2, Value.
PairwiseIBDFile
character
Path to pairwise IBD file. Tab-delimited with 5 columns: ID1, ID2, pa, pb, pc.
Control Parameters (optional)
Parameter
Type
Default
Description
MaxQuantile
numeric
0.75
Upper quantile for outlier detection; range [0, 1].
MinQuantile
numeric
0.25
Lower quantile for outlier detection; range [0, 1].
OutlierRatio
numeric
1.5
IQR multiplier for outlier bounds; must be > 0.
ControlOutlier
logical
TRUE
Adjust ratio to keep outliers < 5%. Set FALSE for higher accuracy.
MaxNuminFam
integer
5
Maximum family size for graph decomposition; must be ≥ 2.
MAF breakpoints for Chow-Liu tree construction; must be in increasing order.
GRAB.Marker
Required Parameters
Parameter
Type
Description
objNull
S3 object
Null model from GRAB.NullModel(), SPAGRM.NullModel(), or SAGELD.NullModel(). Supported classes: POLMM_NULL_Model, SPACox_NULL_Model, SPAmix_NULL_Model, SPAGRM_NULL_Model, SAGELD_NULL_Model, WtCoxG_NULL_Model.
GenoFile
character
Path to genotype file. Extensions: .bed (PLINK) or .bgen (BGEN v1.2).
OutputFile
character
Path for saving association results.
Optional Parameters
Parameter
Type
Default
Description
GenoFileIndex
character vector
NULL
Index files for genotype file. Auto-detected if NULL.