Subset the glance DataFrame based on selected variables.
subset_glance.Rd
This function subsets the glance DataFrame to keep only the specified variables.
Arguments
- glance_df
The glance DataFrame to subset.
- focus
A character vector of variable names to keep, including "AIC", "BIC", "logLik", "deviance", "df.resid", and "dispersion".
Examples
data(iris)
models <- fitModelParallel(Sepal.Length ~ Sepal.Width + Petal.Length,
group_by = "Species",n.cores = 1, data = iris)
#> Log file location: /tmp/RtmpS86cq0/htrfit.log
#> CPU(s) number : 1
#> Cluster type : PSOCK
glance_df <- glance_tmb(models)
glance_df$group_id <- rownames(glance_df)
subset_glance(glance_df, c("AIC", "BIC"))
#> group_id AIC BIC
#> setosa setosa 2.38185 10.02994
#> versicolor versicolor 38.88241 46.53050
#> virginica virginica 31.94600 39.59409