print.ocf.marginal {ocf}R Documentation

Print Method for ocf.marginal Objects

Description

Prints an ocf.marginal object.

Usage

## S3 method for class 'ocf.marginal'
print(x, latex = FALSE, ...)

Arguments

x

An ocf.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

Prints an ocf.marginal object.

Author(s)

Riccardo Di Francesco

References

See Also

ocf, marginal_effects.

Examples

## Generate synthetic data.
set.seed(1986)

data <- generate_ordered_data(100)
sample <- data$sample
Y <- sample$Y
X <- sample[, -1]

## Fit ocf.
forests <- ocf(Y, X)

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

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


[Package ocf version 1.0.1 Index]