Learn R Programming

margins (version 0.2.0)

margins.plm: Marginal Effects for Panel Regression Models

Description

Calculate marginal effects from estimated panel linear and panel generalized linear models

Usage

# S3 method for plm
margins(model, data = NULL, at = NULL, atmeans = FALSE, ...)

# S3 method for pglm margins(model, data = NULL, at = NULL, atmeans = FALSE, ...)

Arguments

model

A model object of class “plm” or “pglm”, from the plm package.

data

A data.frame containing the data at which to evaluate the marginal effects, as in predict.

at

A list of one or more named vectors, specifically values at which to calculate the marginal effects. See build_datalist for details on use.

atmeans

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.

Value

An object of class “marginslist”, composed of one or more objects of class “margins”.

See Also

plot.margins, extract_marginal_effects