Learn R Programming

Qindex (version 0.1.6)

predict.optimSplit_dichotom: Regression Models with Optimal Dichotomizing Predictors

Description

Regression models with optimal dichotomizing predictor(s), used either as boolean or continuous predictor(s).

Usage

# S3 method for optimSplit_dichotom
predict(
  object,
  formula = attr(object, which = "formula", exact = TRUE),
  newdata = attr(object, which = "data", exact = TRUE),
  boolean = TRUE,
  ...
)

Value

Function predict.optimSplit_dichotom returns a list of regression models, coxph model for Surv response, glm for logical response, and lm model for numeric response.

Arguments

object

an optimSplit_dichotom object

formula

(optional) formula to specify the response in test data. If missing, the model formula of training data is used

newdata

(optional) test data.frame, candidate numeric predictors \(x\)'s must have the same name and dimension as the training data. If missing, the training data is used

boolean

logical scalar, whether to use the dichotomized predictor (default, TRUE), or the continuous predictor (FALSE)

...

additional parameters, currently not in use

Examples

Run this code
# see ?`Qindex-package`

Run the code above in your browser using DataLab