predict.plasso_fit: Prediction based on Post-Lasso and provides prediction...

View source: R/ml_wrapper.R

predict.plasso_fitR Documentation

Prediction based on Post-Lasso and provides prediction weights if required.

Description

Prediction based on Post-Lasso and provides prediction weights if required.

Usage

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

Arguments

plasso_fit

Output of plasso_fit

x

Covariate matrix of training sample

y

Vector of outcomes of training sample

xnew

Covariate matrix of test sample

weights

If TRUE, weights underlying the prediction for xnew calculated

Value

Returns list containing:

prediction

vector of predictions for xnew

weights

If weights=TRUE prediction weights of dimension nrow(xnew) x nrow(x) containing the weights that deliver predictions where each row gives the weight that each training outcome received in the prediction for xnew.


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