y*****w 发帖数: 1350 | 1 It seems survreg() in R and PROC LIFEREG in SAS run the same type of
survival analysis. However, when I ran both of them on a survival data, I
got different results. Both were set as exponential distribution, and have
right censored data. See below. Could anybody tell me why the results are
different? Did I miss specifying any important parameters in R? Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The R code:
survFit <- survreg(Surv(time, event, type="right") ~ female, data=data1,
dist="exponential", x = TRUE)
summary(survFit)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The SAS code:
proc lifereg data=data1;
model time*event(0)=female / dist=exponential;
run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The R output:
Call:
survreg(formula = Surv(time, event, type = "right") ~ female, data = data1,
dist = "exponential",
x = TRUE)
Value Std. Error z p
(Intercept) 6.8872 0.577 11.9290 8.36e-33
femaleYes -0.0435 0.764 -0.0569 9.55e-01
Scale fixed at 1
Exponential distribution
Loglik(model)= -55 Loglik(intercept only)= -55
Chisq= 0 on 1 degrees of freedom, p= 0.95
Number of Newton-Raphson Iterations: 5
n= 24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The SAS output:
The LIFEREG Procedure
Model Information
Data Set WORK.DATA1
Dependent Variable Log(time)
Censoring Variable event
Censoring Value(s) 0
Number of Observations 24
Noncensored Values 7
Right Censored Values 17
Left Censored Values 0
Interval Censored Values 0
Name of Distribution Exponential
Log Likelihood -21.97257342
Number of Observations Read 24
Number of Observations Used 24
Fit Statistics
-2 Log Likelihood 43.945
AIC (smaller is better) 47.945
AICC (smaller is better) 48.517
BIC (smaller is better) 50.301
Algorithm converged.
Type III Analysis of Effects
Wald
Effect DF Chi-Square Pr > ChiSq
female 1 0.0032 0.9546
Analysis of Maximum Likelihood Parameter Estimates
Standard 95% Confidence Chi- Pr >
Parameter DF Estimate Error Limits Square ChiSq
Intercept 1 6.8655 0.3819 6.1170 7.6140 323.21 <.0001
female 1 -0.0217 0.3819 -0.7702 0.7267 0.00 0.9546
Scale 0 1.0000 0.0000 1.0000 1.0000
Weibull Shape 0 1.0000 0.0000 1.0000 1.0000
Lagrange Multiplier Statistics
Parameter Chi-Square Pr > ChiSq
Scale 0.0109 0.9168 |
|