rf {comets}R Documentation

Implemented regression methods

Description

Implemented regression methods

Usage

rf(y, x, ...)

survforest(y, x, ...)

qrf(y, x, ...)

lasso(y, x, ...)

ridge(y, x, ...)

postlasso(y, x, ...)

cox(y, x, ...)

Arguments

y

Vector (or matrix) of response values.

x

Design matrix of predictors.

...

Additional arguments passed to the underlying regression method. In case of "rf", "survforest" and "qrf", this is ranger. In case of "lasso" and "ridge", this is glmnet. In case of "cox", this is coxph.

Details

The implemented choices are "rf" for random forests as implemented in ranger, "lasso" for cross-validated Lasso regression (using the one-standard error rule), "ridge" for cross-validated ridge regression (using the one-standard error rule), "cox" for the Cox proportional hazards model as implemented in survival, "qrf" or "survforest" for quantile and survival random forests, respectively. The option "postlasso" option refers to a cross-validated LASSO (using the one-standard error rule) and subsequent OLS regression. New regression methods can be implemented and supplied as well and need the following structure. The regression method "custom_reg" needs to take arguments y, x, ..., fit the model using y and x as matrices and return an object of a user-specified class, for instance, 'custom'. For the GCM test, implementing a residuals.custom method is sufficient, which should take arguments object, response = NULL, data = NULL, .... For the PCM test, a predict.custom method is necessary for out-of-sample prediction and computation of residuals.


[Package comets version 0.0-2 Index]