R/methylationLME_steps.R
fitMethylationLMEModels.RdFit one linear mixed-effects model per CpG for each phenotype requested in the
object returned by prepareMethylationLMEData().
fitMethylationLMEModels(
preparedData,
nCores = 1L,
libPath = NULL,
lmeLibs = "lme4,lmerTest",
correlationStructure = "none",
correlationVar = NULL,
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_methylationLME.txt"
)Object returned by prepareMethylationLMEData().
Integer. Number of worker processes to use.
Character vector or NULL. Optional library paths forwarded
to worker processes.
Character vector or comma-separated string of package names to
check on worker processes. The default is "lme4,lmerTest".
Character. Residual correlation structure used
when lmeLibs selects "nlme". One of "none", "AR1", or "CAR1".
Character or NULL. Variable used to order repeated
observations within personVar for AR1 or CAR1 residual correlation
structures. Must be supplied explicitly for AR1 or CAR1.
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
A list with class "dnaEPICO_methylationLME_models"
containing fitted model lists, model formulas, and counts of failed CpG
fits.
ex <- dnaEPICO:::exampleMethylationLMEStateDnaEpico()
model_results <- fitMethylationLMEModels(
preparedData = ex$preparedData,
nCores = 1,
verbose = FALSE,
logs = FALSE
)
names(model_results$fits)
#> [1] "score"