View source: R/autoReg.coxph.R
autoRegCox | R Documentation |
perform automatic regression for a class of coxph
autoRegCox(
x,
threshold = 0.2,
uni = FALSE,
multi = TRUE,
final = FALSE,
imputed = FALSE,
keepstats = FALSE,
...
)
x |
An object of class coxph |
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 |
... |
Further arguments to be passed to gaze() |
autoRegCox returns an object of class "autoReg" which inherits from the class "data.frame" with at least the following attributes:
character. name of dependent variable
name of model. One of "lm","glm" or "coxph"
require(survival)
require(dplyr)
data(cancer)
fit=coxph(Surv(time,status==2)~log(bili)+age+cluster(edema),data=pbc)
autoReg(fit)
fit=coxph(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) %>% myft()
data(colon_s,package="finalfit")
fit=coxph(Surv(time,status)~age.factor+sex.factor+obstruct.factor+perfor.factor,data=colon_s)
autoReg(fit,uni=TRUE,threshold=1)
autoReg(fit,uni=TRUE,imputed=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.