AvgMargin: Compute average marginal effects

View source: R/AvgMargin.R

AvgMarginR Documentation

Compute average marginal effects

Description

AvgMargin computes average predicted values based on the given data at specified level of voi

Usage

AvgMargin(data, model, voi, range = c(0:10))

Arguments

data

A dateframe with voi

model

lm or glm model

voi

Variable of interest to be calculated.

range

The value of voi to be predicted. For factor, use levels(data$voi) or specify factor levels

Value

dataframe of average predicted value at sepecified levels


jinyikuang000/normr documentation built on May 17, 2023, 5:58 p.m.