[R] post a message - R help. Surivival analysis and goodness of fit
Luke Gaylor
luke.gaylor at live.com.au
Thu Nov 5 15:34:56 CET 2015
Hello there,
I have registered for both through nabble and R-help-request with this email.
I want to post the following question:
I want to implement a Hosmer Lemeshow Goodness of Fit test to my survival analysis.
In R we can use the hoslem.test() function.
The x values are our observations, and y are our fitted probabilities.
So we can take the following data:
s <- Surv(ovarian$futime, ovarian$fustat)
sWei <- survreg(s ~ age,dist='weibull',data=ovarian)
so here we assume a weibull distribution. I want to do a HL GOF test to see, if this is an invalid assumption.
Now how do we get our predicted probabilities. I assume it is with the predict() function.
I have tried the code, but it is not correct
predict(sWei, newdata=list(ovarian$age), type = 'response')
[[alternative HTML version deleted]]
More information about the R-help
mailing list