autoRegsurvreg {autoReg}R Documentation

perform automatic regression for a class of survreg

Description

perform automatic regression for a class of survreg

Usage

autoRegsurvreg(
  x,
  threshold = 0.2,
  uni = FALSE,
  multi = TRUE,
  final = FALSE,
  imputed = FALSE,
  keepstats = FALSE,
  mode = 1,
  ...
)

Arguments

x

An object of class survreg

threshold

numeric

uni

logical whether or not perform univariable regression

multi

logical whether or not perform multivariable regression

final

logical whether or not perform stepwise backward elimination

imputed

logical whether or not perform multiple imputation

keepstats

logical whether or not keep statistic

mode

integer

...

Further arguments to be passed to gaze()

Value

autoRegsurvreg returns an object of class "autoReg" which inherits from the class "data.frame" with at least the following attributes:

attr(*,"yvars)

character. name of dependent variable

attr(*,"model")

name of model. One of "lm","glm","coxph" or "survreg"

Examples

require(survival)
require(dplyr)
data(cancer)
fit=survreg(Surv(time,status)~rx+age+sex+nodes+obstruct+perfor,data=colon)
autoReg(fit)
autoReg(fit,uni=TRUE,threshold=1)
autoReg(fit,uni=TRUE,final=TRUE)
autoReg(fit,uni=TRUE,final=TRUE) %>% myft()
## Not run: 
autoReg(fit,mode=2)
autoReg(fit,uni=TRUE,threshold=1,,mode=2)
autoReg(fit,uni=TRUE,final=TRUE,mode=2)
autoReg(fit,uni=TRUE,final=TRUE,mode=2) %>% myft()
autoReg(fit,final=TRUE,imputed=TRUE) %>% myft()
autoReg(fit,final=TRUE,imputed=TRUE,mode=2) %>% myft()

## End(Not run)

[Package autoReg version 0.3.3 Index]