cv_predict: Out of Sample Predictions Using Cross Valiation

Description Usage Arguments

View source: R/cross_validation.R

Description

Out of Sample Predictions Using Cross Valiation

Usage

1
2
3
4
5
6
7
cv_predict(x, ...)

## Default S3 method:
cv_predict(x, y, tmt, model, folds = 3, ...)

## S3 method for class 'formula'
cv_predict(x, data, model, folds = 3, ...)

Arguments

x

a data.frame or matrix with predictor variables measured prior to treatment or unaffected by treatment. Alternatively, this can be a model formula: outcome ~ x1 + x2 | treatment

...

extra parameters passed to model.

y

a vector of outcomes.

tmt

a vector indicating which units received treatment.

model

a hete_model to use for making predictions. are passed to the model fitting function.

folds

the number of folds to use for cros validation.

data

a data.frame containing the variables specified in x when using a formula to specify the model.


wlattner/hete documentation built on May 4, 2019, 12:57 a.m.