Skip to contents

This function fits the model using the specified group, group_by, formula, and data. It handles warnings and errors during the fitting process and returns the fitted model or NULL if there was an error.

Usage

launchFit(data, group_by, formula, ...)

Arguments

data

Data frame containing the data

group_by

Column name in data representing the grouping variable

formula

Formula specifying the model formula

...

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

Value

List with 'glance' and 'summary' attributes representing the fitted model or NULL if there was an error

Examples

launchFit(group_by = "Species", 
           formula = Sepal.Length ~ Sepal.Width + Petal.Length, 
           data = iris[ iris[["Species"]] == "setosa" , ] )
#> Formula:          Sepal.Length ~ Sepal.Width + Petal.Length
#> Data: data
#>      AIC      BIC   logLik df.resid 
#>  2.38185 10.02994  2.80907       46 
#> 
#> Number of obs: 50
#> 
#> Dispersion estimate for gaussian family (sigma^2): 0.0523 
#> 
#> Fixed Effects:
#> 
#> Conditional model:
#>  (Intercept)   Sepal.Width  Petal.Length  
#>       2.3037        0.6674        0.2834