glances()
repeatedly calls glance()
on several
fitted model objects and binds the output together, sorted by a column of interest.
Sort by a glance
statistic (i.e., the name of a column
output from glance()
or the order of model input (sort_by = "order"
).
The default is "AICc"
.
Should sort_by
be decreasing or not? The default is FALSE
.
A tibble where each row represents the output of glance()
for
each fitted model object.
# Copy the mf04p .ssn data to a local directory and read it into R
# When modeling with your .ssn object, you will load it using the relevant
# path to the .ssn data on your machine
copy_lsn_to_temp()
temp_path <- paste0(tempdir(), "/MiddleFork04.ssn")
mf04p <- ssn_import(temp_path, overwrite = TRUE)
# tailup only
ssn_mod1 <- ssn_lm(
formula = Summer_mn ~ ELEV_DEM,
ssn.object = mf04p,
tailup_type = "exponential",
additive = "afvArea"
)
# taildown only
ssn_mod2 <- ssn_lm(
formula = Summer_mn ~ ELEV_DEM,
ssn.object = mf04p,
taildown_type = "exponential"
)
glances(ssn_mod1, ssn_mod2)
#> # A tibble: 2 × 10
#> model n p npar value AIC AICc logLik deviance pseudo.r.squared
#> <chr> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 ssn_mod1 45 2 3 76.9 82.9 83.5 -38.4 43.0 0.585
#> 2 ssn_mod2 45 2 3 123. 129. 129. -61.4 43.4 0.0917