residualNull | R Documentation |
Make a residual plot of NULL model
residualNull(x, add.log = TRUE, type = "martingale")
x |
An object of calss coxph |
add.log |
logical If true, log of predictor varaibles are added |
type |
character type of residuals |
library(survival)
data(pharmacoSmoking,package="asaur")
pharmacoSmoking$priorAttemptsT=pharmacoSmoking$priorAttempts
pharmacoSmoking$priorAttemptsT[pharmacoSmoking$priorAttemptsT>20]=20
x=coxph(Surv(ttr,relapse)~age+priorAttemptsT+longestNoSmoke,data=pharmacoSmoking)
residualNull(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.