Skip to contents

This function fits and updates a GLMNB model using the provided formula.

Usage

fitUpdate(group, glmm_obj, formula, ...)

Arguments

group

group id to save in glmmTMB obj (usefull for update !)

glmm_obj

A glmmTMB object to be updated.

formula

Formula for the updated GLMNB model.

...

Additional arguments to be passed to the glmmTMB::glmmTMB function.

Value

An updated GLMNB model.

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)
#> Log file location: /tmp/RtmpS86cq0/htrfit.log
#> CPU(s) number : 1
#> Cluster type : PSOCK
new_formula <- Sepal.Length ~ Sepal.Width 
updated_model <- fitUpdate("setosa", fitted_models[[1]], new_formula)