% Generated by roxygen2: do not edit by hand % Please edit documentation in R/updatefitmodel.R \name{updateParallel} \alias{updateParallel} \title{Update GLMNB models in parallel.} \usage{ updateParallel(formula, l_tmb, n.cores = NULL, log_file = "log.txt", ...) } \arguments{ \item{formula}{Formula for the GLMNB model.} \item{l_tmb}{List of GLMNB objects.} \item{n.cores}{Number of cores to use for parallel processing. If NULL, the function will use all available cores.} \item{log_file}{File path for the log output.} \item{...}{Additional arguments to be passed to the glmmTMB::glmmTMB function.} } \value{ A list of updated GLMNB models. } \description{ This function fits GLMNB models in parallel using multiple cores, allowing for faster computation. } \examples{ data(iris) groups <- unique(iris$Species) group_by <- "Species" formula <- Sepal.Length ~ Sepal.Width + Petal.Length fitted_models <- fitModelParallel(formula, iris, group_by, n.cores = 1) new_formula <- Sepal.Length ~ Sepal.Width results <- updateParallel(new_formula, fitted_models, n.cores = 1) }