smargins.default: Calculate average marginal effects from a fitted model...

Description Usage Arguments Value Author(s)

View source: R/smargin.R

Description

Calculate average marginal effects from a fitted model object.

Usage

1
2
3
4
5
## Default S3 method:
smargins(model, ..., n = 5000, coef.fun = coef,
  sim.fun = I, linkinv.fun = family(model)$linkinv, vcov.fun = vcov,
  model.frame.fun = model.frame, model.matrix.fun = function(x, data) {    
  model.matrix(formula(x), data = data) })

Arguments

model

A fitted model object.

...

Named values to set predictor variables to.

n

Number of simulations to run.

coef.fun

Function to use for computing coefficients.

sim.fun

Function to use for adjusting simulations.

linkinv.fun

Function to use for cmputing the inverse link.

vcov.fun

Function to use for computing the variance-covariance matrix.

model.frame.fun

Function to use for extracting the model.frame.

model.matrix.fun

Function to use for extracting the model.matrix.

Value

A data.frame containing predictor variables values and expected values of the dependant variable.

Author(s)

Ista Zahn


izahn/smargins documentation built on Sept. 11, 2019, 2:08 p.m.