Newer
Older
% Please edit documentation in R/update_fittedmodel.R
updateParallel(formula, list_tmb, n.cores = NULL, log_file = "log.txt", ...)
}
\arguments{
\item{formula}{Formula for the GLMNB model.}
\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 glmmTMB 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)
}