[R] Coxme time-dependent covariate

2013-12-12 Thread Jared Duquette
Hi all,



I am using the coxme function to fit random effects survival models.  The
base survival models show a typical J shaped curve where survival drops
sharply then plateaus over time interval.  I want to include a time
covariate which could account for this non-linear decrease in survival over
time.  However, I have not found a clear way to do this in the coxme
models.  Any suggestions would be greatly appreciated.  Below is some
sample code and data.



-Jared



selection=coxme(Surv(start,stop,status)~prob+(1|year);



fawn

status

start

 stop

prob

year

3

0

0

86

0.83

2009

4

1

0

9

0.6

2009

5

0

0

355

0.63

2009

6

1

0

6

0.52

2010

7

0

0

68

0.79

2010

8

0

0

354

0.69

2010

9

1

0

3

0.72

2010

10

1

0

4

0.77

2010

11

1

0

12

0.62

2010

13

0

0

82

0.7

2011

14

1

0

7

0.67

2011

15

1

0

74

0.49

2011

16

0

0

351

0.64

2011

17

0

0

351

0.74

2011

18

0

0

82

0.72

2011

19

1

0

342

0.69

2011

[[alternative HTML version deleted]]

__
R-help@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.


[R] Change x-axis intervals and labels on cox.zph plot

2013-11-12 Thread Jared Duquette
Hi all,
The plot.cox.zph function automatically plots the x-axis, but I would like
to change the intervals and labels of my cox.zph plots to 0, 50,100,150,
200. However, I cannot get the function to do so. I tried using the
axis(... function, but that did not override the existing plot labels.
Below is my code and attached example plots which I am trying to modify.
Thank you in advance for your consideration and assistance.
#plot.cox.zph code
iw.zph=cox.zph(idealweather);
par(mfrow=c(2,1),ann=F,mar=c(3.2,3.5,1.2,0.5),mgp=c(1.7, 0.6,
0),cex.axis=1.1,cex.lab=1.2,cex=0.9,pch=16,family=serif,col.axis=1);
plot.cox.zph(iw.zph);
title(ylab=scaled Schoenfeld,xlab=Time (days));

[[alternative HTML version deleted]]

__
R-help@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.