Re: [R] Survplot, Y-axis in percent

2012-11-07 Thread maziar.mohaddes
Dear Prof Harell, great thanks for your solution to this. I have been trying to figure this out last four weeks by reading loads of manuals and forums around the net without success. Once again thank you for the solution and the great option of shadowed Conf int in the survplot Best Regards --

Re: [R] Survplot, Y-axis in percent

2012-11-07 Thread Frank Harrell
Don't change the code. Just use survplot(..., fun=function(y)100*y, ylim=c(0,100)). But note that percent is not recommended as it is more confusing than proportions, especially when talking about differences in percents. Frank Andrews, Chris wrote > It doesn't look like 'survplot' allows you to

Re: [R] Survplot, Y-axis in percent

2012-11-07 Thread Andrews, Chris
It doesn't look like 'survplot' allows you to control the yaxis formatting in that way. You can edit the function survplot.survfit directly if you really need to: fix(survplot.survfit). The relevant line to change is (I believe) mgp.axis(2, at = pretty(ylim)) to mgp.axis(2, at = pretty(ylim),

Re: [R] Survplot, Y-axis in percent

2012-11-06 Thread David Winsemius
On Nov 6, 2012, at 1:39 PM, maziar.mohaddes wrote: > Thanks alot for ur help. Sorry about me be being a real rookie in forum > manners. > I am pretty new to R and although i did read the forum rules before > submitting obvoiusly I was not able to > I did try the yaxt=n, as stated in my post. > I

Re: [R] Survplot, Y-axis in percent

2012-11-06 Thread David Winsemius
On Nov 6, 2012, at 12:18 PM, maziar.mohaddes wrote: >> As far as I can see, survplot.survfit (from package rms) is written with > base graphics, so you need to suppress the >> default axis call with yaxt=FALSE, and replace it with your desired >> values using axis(2, at=..., labels=...). > Than

Re: [R] Survplot, Y-axis in percent

2012-11-06 Thread maziar.mohaddes
> As far as I can see, survplot.survfit (from package rms) is written with base graphics, so you need to suppress the > default axis call with yaxt=FALSE, and replace it with your desired > values using axis(2, at=..., labels=...). Thanks alot for your response. Unfortunately yaxt function does

Re: [R] Survplot, Y-axis in percent

2012-11-06 Thread David Winsemius
On Nov 6, 2012, at 8:10 AM, maziar.mohaddes wrote: > Hi > > I am a new fan of R after getting mad with the graphical functional in SPSS. > I have been able to create a nice looking Kaplan Meyer graph using Survplot > function. > However I have difficulties in turning the y axis to percent inst