Newer
Older
% Please edit documentation in R/update_fittedmodel.R
\name{fitUpdate}
\alias{fitUpdate}
\title{Fit and update a GLMNB model.}
\usage{
Arnaud Duvermy
committed
fitUpdate(group, glmm_obj, formula, ...)
Arnaud Duvermy
committed
\item{group}{group id to save in glmmTMB obj (usefull for update !)}
\item{formula}{Formula for the updated GLMNB model.}
\item{...}{Additional arguments to be passed to the glmmTMB::glmmTMB function.}
}
\value{
An updated GLMNB model.
}
\description{
This function fits and updates a GLMNB model using the provided formula.
}
\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
Arnaud Duvermy
committed
updated_model <- fitUpdate("setosa", fitted_models[[1]], new_formula)