Hi all,
I am trying to run Weibull PH model in R.
Assume in the data set I have x1 a continuous variable and x2 a
categorical variable with two classes (0= sick and 1= healthy). I fit the
model in the following way.
Test=survreg(Surv(time,cens)~ x1+x2,dist="weibull")
My questions are
1. Is it Weibull PH model or Weibull AFT model?
Call:
survreg(formula = Surv(time, delta) ~ x1 + x2, data = nn,
dist = "weibull")
Value Std. Error z p
(Intercept) 5.652155 3.54e-02 159.8 0.00e+00
x1 0.492592 1.92e-02 25.7 3.65e-145
x2 -0.000212 5.64e-06 -37.6 0.00e+00
Log(scale) -0.269219 1.57e-02 -17.1 1.24e-65
Scale= 0.764
2. I am interested in comparing the two classes of x2 (short, medium and
long) using the Weibull PH model. So I used factor(x2) in the model
Call:
survreg(formula = Surv(time, delta) ~ factor(x1) + x2, data = nn
dist = "weibull")
Value Std. Error z p
(Intercept) 6.192157 2.35e-02 263.5 0.00e+00
factor(x1)2 0.324327 3.14e-02 10.3 4.51e-25
factor(x1)3 1.038423 4.13e-02 25.1 2.07e-139
x2 -0.000211 5.64e-06 -37.4 7.89e-306
Log(scale) -0.267627 1.57e-02 -17.0 5.63e-65
Scale= 0.765
How do I interpret those results?
Is there a relationship between Webull PH and AFT Model?
Thanks
Val
[[alternative HTML version deleted]]
On 04/22/2012 05:00 AM, r-help-request at r-project.org wrote:> I am trying to run Weibull PH model in R. > > Assume in the data set I have x1 a continuous variable and x2 a > categorical variable with two classes (0= sick and 1= healthy). I fit the > model in the following way. > > Test=survreg(Surv(time,cens)~ x1+x2,dist="weibull") > > My questions are > > 1. Is it Weibull PH model or Weibull AFT model? > Call: > survreg(formula = Surv(time, delta) ~ x1 + x2, data = nn, > dist = "weibull") > Value Std. Error z p > (Intercept) 5.652155 3.54e-02 159.8 0.00e+00 > x1 0.492592 1.92e-02 25.7 3.65e-145 > x2 -0.000212 5.64e-06 -37.6 0.00e+00 > Log(scale) -0.269219 1.57e-02 -17.1 1.24e-65 > Scale= 0.764The Weibull model can be veiwed as either. The cumulative hazard for a Weibull is t^p, viewed as an AFT model we have (at)^p [multiply time], viewed as PH we have a(t^p) [multiply the hazard]. The survreg routing uses the AFT parameterization found in Chapter 2 of Kalbfleisch and Prentice, "The statistical analysis of failure time data". For the routine our multiplier "a" above is exp(X beta), for the usual reason that negative multipliers should be avoided -- it would correspond to time running backwards. In the above x1 makes time run faster, x2 time run slower. Terry T