[R] Plot survreg and intcox

David Winsemius dwinsemius at comcast.net
Tue Aug 26 18:53:45 CEST 2014


On Aug 26, 2014, at 4:17 AM, Silong Liao wrote:

> 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?

That line at the bottom of the message delivered to the list subscribers saying that the HTL version was deleted explains why this is such a mess. Please read the Posting Guide and post in plain text:

-- 
David.
> 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]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list