Description Usage Arguments Details Value Author(s) See Also Examples
Likelihood ratio test for Weibull as a submodel of the exponentiated Weibull or generalized gamma model.
1 | LR.test(fit)
|
fit |
a list of two |
The log-likelihood values from the two fits are used for the likelihood ratio test.
chi.sq:
chi-square test statistic.
p value:
p value.
Shahedul Khan <khan@math.usask.ca>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(frailtypack)
data(readmission)
# Recoding sex and chemo
sex<-factor(2-as.numeric(readmission$sex),
labels=c("Female","Male"))
chemo<-factor(as.numeric(readmission$chemo)-1,
labels=c("NonTreated","Treated"))
Data<-readmission
Data$sex<-sex
Data$chemo<-chemo
fit.gg<-survreg.aft(c(t.start,t.stop,event)~sex+chemo+charlson,
Data=Data,model="ggamma")
fit.ew<-survreg.aft(c(t.start,t.stop,event)~sex+chemo+charlson,
Data=Data,model="eweibull")
fit.w<-survreg.aft(c(t.start,t.stop,event)~sex+chemo+charlson,
Data=Data,model="weibull")
LR.test(list(fit.w,fit.ew))
LR.test(list(fit.w,fit.gg))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.