% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.R
\name{print.GenericML}
\alias{print.GenericML}
\title{Print method for a \code{GenericML} object}
\usage{
\method{print}{GenericML}(x, digits = max(3L, getOption("digits") - 3L), ...)
}
\arguments{
\item{x}{An object of the class \code{"\link{GenericML}"}, as returned by the function \code{\link{GenericML}()}.}

\item{digits}{Number of digits to print.}

\item{...}{Additional arguments to be passed down.}
}
\value{
A print to the console.
}
\description{
Prints key results of the analyses conducted in \code{\link{GenericML}()}.
}
\examples{
if(require("ranger")){

## generate data
set.seed(1)
n  <- 150                                  # number of observations
p  <- 5                                    # number of covariates
D  <- rbinom(n, 1, 0.5)                    # random treatment assignment
Z  <- matrix(runif(n*p), n, p)             # design matrix
Y0 <- as.numeric(Z \%*\% rexp(p) + rnorm(n)) # potential outcome without treatment
Y1 <- 2 + Y0                               # potential outcome under treatment
Y  <- ifelse(D == 1, Y1, Y0)               # observed outcome

## specify learners
learners <- c("random_forest")

## perform generic ML inference
# small number of splits to keep computation time low
x <- GenericML(Z, D, Y, learners, num_splits = 2,
               parallel = FALSE)

## print
print(x)
}

}
