[R] SURVIVAL A

CHIRIBOGA Xavier xavier.chiriboga at unine.ch
Fri Apr 10 10:36:03 CEST 2015


Dear members: I am trying to run a survival analysis with "survreg". Apparently it worked, but when I aim to fin différences between groups of the mdoel I got an erro message: Please see below.

I do not know What does it mean?



Thanks,



Xavier







model1<-survreg(Surv(data$Hours,data$State)~data$Soil*data$Caryo,data=data)
> model2<-survreg(Surv(data$Hours,data$State)~data$Soil*data$Caryo,data=data)
> anova(model1,model2)
                   Terms Resid. Df    -2*LL Test Df Deviance Pr(>Chi)
1 data$Soil * data$Caryo       248 2072.528      NA       NA       NA
2 data$Soil * data$Caryo       248 2072.528    =  0        0       NA
> summary(model1)

Call:
survreg(formula = Surv(data$Hours, data$State) ~ data$Soil *
    data$Caryo, data = data)
                                  Value Std. Error      z         p
(Intercept)                      4.3605     0.0417 104.51  0.00e+00
data$SoilCL                     -0.0784     0.0590  -1.33  1.84e-01
data$SoilCS                     -0.3865     0.0567  -6.81  9.59e-12
data$SoilSAND                   -0.1913     0.0579  -3.30  9.61e-04
data$Caryonocaryo               -0.1600     0.0579  -2.76  5.74e-03
data$SoilCL:data$Caryonocaryo    0.1320     0.0823   1.60  1.09e-01
data$SoilCS:data$Caryonocaryo    0.2679     0.0812   3.30  9.64e-04
data$SoilSAND:data$Caryonocaryo  0.0821     0.0809   1.01  3.10e-01
Log(scale)                      -1.4788     0.0442 -33.46 1.73e-245

Scale= 0.228

Weibull distribution
Loglik(model)= -1036.3   Loglik(intercept only)= -1065
        Chisq= 57.41 on 7 degrees of freedom, p= 5e-10
Number of Newton-Raphson Iterations: 5
n= 257

> diference1<-survdiff(Surv(data$Hours,data$State)~data$Soil*data$Caryo,data=data)
Error in `[.data.frame`(m, ll) : undefined columns selected



More information about the R-help mailing list