predict.lasso_fit: Prediction based on Lasso Forest and provides prediction...

View source: R/ml_wrapper.R

predict.lasso_fitR Documentation

Prediction based on Lasso Forest and provides prediction weights if required.

Description

Prediction based on Lasso Forest and provides prediction weights if required.

Usage

## S3 method for class 'lasso_fit'
predict(lasso_fit, x, y, xnew = NULL, weights = FALSE)

Arguments

lasso_fit

Output of glmnet or lasso_fit

x

Covariate matrix of training sample

y

Vector of outcomes of training sample

xnew

Covariate matrix of test sample

weights

Always FALSE as

Value

Returns list containing:

prediction

vector of predictions for xnew

weights

Not available for Lasso, only for Post-Lasso


MCKnaus/causalDML documentation built on Aug. 19, 2023, 5:47 p.m.