Learn R Programming

spmodel (version 0.8.0)

glances: Glance at many fitted model objects

Description

glances() repeatedly calls glance() on several fitted model objects and binds the output together, sorted by a column of interest.

Usage

glances(object, ...)

# S3 method for splm glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for spautor glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for splm_list glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for spautor_list glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for spglm glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for spgautor glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for spglm_list glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

# S3 method for spgautor_list glances(object, ..., sort_by = "AICc", decreasing = FALSE, warning = TRUE)

Value

A tibble where each row represents the output of glance() for each fitted model object.

Arguments

object

A fitted model object from splm(), spautor(), spglm(), or spgautor().

...

Additional fitted model objects. Ignored if object has class splm_list, spautor_list, spglm_list, or spgautor_list.

sort_by

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".

decreasing

Whether sort_by should sort by decreasing order? The default is FALSE.

warning

Whether a warning is displayed when model comparisons violate certain rules. The default is TRUE.

Examples

Run this code
lmod <- splm(z ~ water + tarp,
  data = caribou,
  spcov_type = "none"
)
spmod <- splm(z ~ water + tarp,
  data = caribou,
  spcov_type = "exponential", xcoord = x, ycoord = y
)
glances(lmod, spmod)
glances(lmod, spmod, sort_by = "logLik", decreasing = TRUE)

Run the code above in your browser using DataLab