[R] Plot survreg and intcox

Silong Liao silong.liao at hotmail.com
Tue Aug 26 13:17:14 CEST 2014


Dear R users,
I'm trying to plot survival probability against time(in years) using "survreg" and "intcox". Please can you help me with this problem?
My code shows below:>mod.reg1=survreg(s_new~type+sex+eye+preopiop+preopva,dist="weibull")>summary(mod.reg1)
Call:survreg(formula = s_new ~ type + sex + eye + preopiop + preopva,     dist = "weibull")             Value Std. Error      z        p(Intercept) 40.539     20.582  1.970 4.89e-02typeTrab    -6.606      4.279 -1.544 1.23e-01sexM        -1.055      3.765 -0.280 7.79e-01eyeR        -2.112      3.587 -0.589 5.56e-01preopiop    -0.308      0.269 -1.147 2.52e-01preopva     -0.461      1.771 -0.260 7.95e-01Log(scale)   2.058      0.285  7.222 5.12e-13
Scale= 7.83 
Weibull distributionLoglik(model)= -78.7   Loglik(intercept only)= -81.4	Chisq= 5.37 on 5 degrees of freedom, p= 0.37 Number of Newton-Raphson Iterations: 10 n= 339
------------------------------------------------------------------------------------------------------------->cox.fit=intcox(s_new~type+eye+sex+age+preopiop+preopva,data=glaucoma_new)>summary(cox.fit)Call:intcox(formula = s_new ~ type + eye + sex + age + preopiop +     preopva, data = glaucoma_new)
  n= 339
             coef exp(coef) se(coef)  z Pr(>|z|)typeTrab  0.59391   1.81106       NA NA       NAeyeR      0.28419   1.32868       NA NA       NAsexM     -0.11597   0.89050       NA NA       NAage      -0.06556   0.93655       NA NA       NApreopiop  0.03903   1.03980       NA NA       NApreopva  -0.05517   0.94632       NA NA       NA
         exp(coef) exp(-coef) lower .95 upper .95typeTrab    1.8111     0.5522        NA        NAeyeR        1.3287     0.7526        NA        NAsexM        0.8905     1.1230        NA        NAage         0.9365     1.0678        NA        NApreopiop    1.0398     0.9617        NA        NApreopva     0.9463     1.0567        NA        NA
Rsquare= NA   (max possible= 0.327 )Likelihood ratio test= NA  on 6 df,   p=NAWald test            = NA  on 6 df,   p=NAScore (logrank) test = NA  on 6 df,   p=NA


Kind regards,Sid

 		 	   		  
	[[alternative HTML version deleted]]



More information about the R-help mailing list