ModelFrame {MachineShop} | R Documentation |
Class for storing data, formulas, and other attributes for MachineShop model fitting.
ModelFrame(x, ...) ## S3 method for class 'formula' ModelFrame(x, data, na.rm = TRUE, weights = NULL, strata = NULL, ...) ## S3 method for class 'matrix' ModelFrame( x, y = NULL, na.rm = TRUE, offsets = NULL, weights = NULL, strata = NULL, ... )
x |
|
... |
arguments passed to other methods. |
data |
data frame or an object that can be converted to one. |
na.rm |
logical indicating whether to remove cases with |
weights |
vector of case weights [default: equal]. |
strata |
vector of resampling stratification levels [default: none]. |
y |
response variable. |
offsets |
numeric vector, matrix, or data frame of values to be added with a fixed coefficient of 1 to linear predictors in compatible regression models. |
ModelFrame
class object that inherits from data.frame
.
fit
, resample
, response
,
SelectedInput
## Requires prior installation of suggested package gbm to run mf <- ModelFrame(ncases / (ncases + ncontrols) ~ agegp + tobgp + alcgp, data = esoph, weights = with(esoph, ncases + ncontrols)) gbm_fit <- fit(mf, model = GBMModel) varimp(gbm_fit)