margins: Marginal Effects

View source: R/margins.R

marginsR Documentation

Marginal Effects

Description

S3 generic method for estimation of marginal effects of an Ordered Forest objects of class orf.

Usage

margins(forest, eval = NULL, inference = NULL, window = NULL, newdata = NULL)

Arguments

forest

estimated Ordered Forest object of class orf

eval

string, defining evaluation point for marginal effects. These can be one of "mean", "atmean", or "atmedian". (Default is "mean")

inference

logical, if TRUE inference on marginal effects will be conducted (default is inherited from the orf object)

window

numeric, share of standard deviation of X to be used for evaluation of the marginal effect (default is 0.1)

newdata

numeric matrix X containing the new observations for which the marginal effects should be estimated

Author(s)

Gabriel Okasa

See Also

margins.orf, summary.margins.orf and print.margins.orf

Examples

## Ordered Forest
require(orf)

# load example data
data(odata)

# specify response and covariates
Y <- as.numeric(odata[, 1])
X <- as.matrix(odata[, -1])

# estimate Ordered Forest
orf_fit <- orf(X, Y)

# estimate default marginal effects of the orf
orf_margins <- margins(orf_fit)



orf documentation built on July 24, 2022, 1:05 a.m.