[R] Different results from survreg with version 2.6.1 and 2.10.1
nathalcs at student.matnat.uio.no
nathalcs at student.matnat.uio.no
Fri Mar 19 16:07:34 CET 2010
---------------------------- Original Message ----------------------------
Subject: Different results from survreg with version 2.6.1 and 2.10.1
From: nathalcs at ulrik.uio.no
Date: Fri, March 19, 2010 16:00
To: r-help at r-project.org
--------------------------------------------------------------------------
Dear all
I'm using survreg command in package survival.
sur2=survreg(Surv((levetid-364),status==2)~vekt.ind,control=list(maxiter=50),data=ord.mfr)
When using
R version 2.6.1 (2007-11-26)
i386-pc-mingw32
I get this result
summary(sur2)
Call:
survreg(formula = Surv((levetid - 364), status == 2) ~ malder +
faar + gest + vekt.ind, data = ord.mfr, control = list(maxiter = 50))
Value Std. Error z p
(Intercept) 1.49e+01 1.73105 8.5993 8.02e-18
malder 9.22e-02 0.01955 4.7178 2.38e-06
faar 2.78e-02 0.01308 2.1272 3.34e-02
gest 3.79e-04 0.00528 0.0718 9.43e-01
vekt.ind 8.46e-01 0.19575 4.3234 1.54e-05
Log(scale) 6.83e-01 0.03651 18.7086 4.22e-78
Scale= 1.98
Weibull distribution
Loglik(model)= -11108.6 Loglik(intercept only)= -11136.6
Chisq= 55.87 on 4 degrees of freedom, p= 2.1e-11
Number of Newton-Raphson Iterations: 13
n= 254572
while when using
R version 2.10.1 (2009-12-14)
i386-pc-mingw32
this is what I get
ummary(sur2)
Call:
survreg(formula = Surv((levetid - 364), status == 2) ~ malder +
faar + gest + vekt.ind, data = ord.mfr, control = list(maxiter = 50))
Value Std. Error z p
(Intercept) -7.95477 2.83e-34 -2.81e+34 0
malder 0.01635 2.61e-36 6.25e+33 0
faar 0.29213 2.60e-36 1.12e+35 0
gest -0.00275 7.54e-37 -3.64e+33 0
vekt.ind 0.28575 2.96e-35 9.64e+33 0
Log(scale) -95.89809 5.88e-36 -1.63e+37 0
Scale= 2.25e-42
Weibull distribution
Loglik(model)= -82219.2 Loglik(intercept only)= -11136.6
Chisq= -142165.2 on 4 degrees of freedom, p= 1
Number of Newton-Raphson Iterations: 2
n= 254572
which is quite different results, with the result with version 2.6.1 being
the most reasonable.
But if I for instance do a cox-regression on on the same data with the
same covariate with the two different versions I do get the same result,
which is how it should be
R version 2.6.1 (2007-11-26):
print(coxfit2)
Call:
coxph(formula = Surv(levetid, status == 2) ~ malder + faar +
gest + vekt.ind, data = ord.mfr)
coef exp(coef) se(coef) z p
malder -0.046320 0.955 0.00972 -4.767 1.9e-06
faar -0.040658 0.960 0.00639 -6.367 1.9e-10
gest -0.000211 1.000 0.00267 -0.079 9.4e-01
vekt.ind -0.427916 0.652 0.09765 -4.382 1.2e-05
Likelihood ratio test=102 on 4 df, p=0 n= 254572
R version 2.10.1 (2009-12-14):
print(coxfit2)
Call:
coxph(formula = Surv(levetid, status == 2) ~ malder + faar +
gest + vekt.ind, data = ord.mfr)
coef exp(coef) se(coef) z p
malder -0.046320 0.955 0.00972 -4.767 1.9e-06
faar -0.040658 0.960 0.00639 -6.367 1.9e-10
gest -0.000211 1.000 0.00267 -0.079 9.4e-01
vekt.ind -0.427916 0.652 0.09765 -4.382 1.2e-05
Likelihood ratio test=102 on 4 df, p=0 n= 254572
My question is why do this happen with survreg?
Best regards
Nathalie Støer
More information about the R-help
mailing list