pred_dt: Train and Predict a Model in each MC Sample

Description Usage Arguments Details Value

View source: R/mc.R

Description

This function produces fitted values in each MC sample.

Usage

1
pred_dt(data, mcname = "mc", mod, formula, pred_name = "pred", ...)

Arguments

data

MC data set form of mc_data.

mcname

column name of the MC sample. By default, "mc".

mod

Model function.

formula

an object of class formula.

pred_name

column name of the predicted values. By default, "pred".

...

Additional arguments for mod

Details

mod should have formula argument yet. It uses predict.mod() function. Some class has an option called type. For example, predict.glm. This function uses type = "response". Some model functions require x and y, so I will add that feature.

Value

The function adds a column named pred of which values are the fitted values from mod


ygeunkim/youngtool documentation built on Dec. 14, 2019, 7:42 p.m.