Calculate marginal effects from estimated panel linear and panel generalized linear models
# S3 method for plm
margins(model, data = NULL, at = NULL, atmeans = FALSE, ...)# S3 method for pglm
margins(model, data = NULL, at = NULL, atmeans = FALSE,
...)
A model object of class “plm” or “pglm”, from the plm package.
A data.frame containing the data at which to evaluate the marginal effects, as in predict
.
A list of one or more named vectors, specifically values at which to calculate the marginal effects. See build_datalist
for details on use.
A logical indicating whether to calculate marginal effects at the means (i.e., partial effects at the average of all covariates), as opposed to the default average marginal effects (i.e., average partial effects), which is the default.
Arguments passed to marginal_effects
. One of particular relevance for GLMs is type
.
An object of class “marginslist”, composed of one or more objects of class “margins”.