summary.morf.marginal: Summary Method for morf.marginal Objects

View source: R/generic-s3.R

summary.morf.marginalR Documentation

Summary Method for morf.marginal Objects

Description

Summarizes an morf.marginal object.

Usage

## S3 method for class 'morf.marginal'
summary(object, latex = FALSE, ...)

Arguments

object

An morf.marginal object.

latex

If TRUE, prints LATEX code.

...

Further arguments passed to or from other methods.

Details

Compilation of the LATEX code requires the following packages: booktabs, float, adjustbox. If standard errors have been estimated, they are printed in parenthesis below each point estimate.

Value

Summarizes an morf.marginal object.

Author(s)

Riccardo Di Francesco

See Also

morf, marginal_effects.

Examples

## Load data from orf package.
set.seed(1986)

library(orf)
data(odata)
odata <- odata[1:200, ] # Subset to reduce elapsed time.

y <- as.numeric(odata[, 1])
X <- as.matrix(odata[, -1])

## Fit morf. Use large number of trees.
forests <- morf(y, X, n.trees = 4000)

## Marginal effects at the mean.
me <- marginal_effects(forests, eval = "atmean")
summary(me)
summary(me, latex = TRUE)


## Add standard errors.
honest_forests <- morf(y, X, n.trees = 4000, honesty = TRUE)
honest_me <- marginal_effects(honest_forests, eval = "atmean", inference = TRUE)
summary(honest_me, latex = TRUE)


morf documentation built on March 31, 2023, 8:14 p.m.