predict.optimSplit_dichotom: Regression Models with Optimal Dichotomizing Predictors

View source: R/optimSplit_dichotom.R

predict.optimSplit_dichotomR Documentation

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 class 'optimSplit_dichotom'
predict(
  object,
  formula = attr(object, which = "formula", exact = TRUE),
  newdata = attr(object, which = "data", exact = TRUE),
  boolean = TRUE,
  ...
)

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

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.

Examples

# see ?`Qindex-package`

Qindex documentation built on April 4, 2025, 2:14 a.m.