smargins_v2: Temporary smargins variant

Description Usage Arguments Value Author(s)

View source: R/tmp.R

Description

Temporary smargins variant

Usage

1
2
3
4
smargins_v2(model, vars, xvalues = NULL, 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.

vars

Character vector naming variables

xvalues

Named list of values.

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.