[R] Loop and loop output [Cox model, for, function, loglik]

2007-09-10 Thread David Lloyd
Dear R users, Below I have written 4 functions CIT1, CIT2a and CIT2b and CIT3 which recode a variable CLD_ISCH into 3 new variables(T1 T2 T3), I wish to use T1, T2 and T3 based on the values of tf1 and tf2. (NOTE:- T2a is used to create T2 in a long winded manner due to my lack of programming

[R] (coxph, se) Obtaining standard errors of coefficients from coxph to store

2007-08-16 Thread David Lloyd
Hi all, I'm wanting to be able to find and store the z-score of coxph below: - modz=coxph(Surv(TSURV,STATUS)~RAGE+DAGE+REG_WTIME_M+CLD_ISCH+POLY_VS, data=kidneyT,method=breslow) I know summary(modz) will give me this, but how do i extract the standard error or z-score values in a similar way

[R] (Censboot, Z-score, Cox) How to use Z-score as the statistic within censboot?

2007-08-06 Thread David Lloyd
Dear R Help list, My question is regarding extracting the standard error or Z-score from a cph or coxph call. My Cox model is: - modz=cph(Surv(TSURV,STATUS)~RAGE+DAGE+REG_WTIME_M+CLD_ISCH+POLY_VS, data=kidneyT,method=breslow, x=T, y=T) I've used names(modz) but can't see anything that will let

[R] Cut marks on a plot's y-axis to indica te it is a truncated axis

2007-08-01 Thread David Lloyd
Hi, I've plotted a Kaplan-Meier curve but the curves only range from 0.7 to 1 on the y-axis. Therefore I have used: - ylim=c(0.7,1) [although I think convention dictates that you plot 0.5 to 1 to show the median? A few papers I've read have done this]?? BUT, I would like a symbol like // (but

[R] Cut marks on a plot's y-axis to indica te it is a truncated axis

2007-08-01 Thread David Lloyd
Hi, I've plotted a Kaplan-Meier curve but the curves only range from 0.7 to 1 on the y-axis. Therefore I have used: - ylim=c(0.7,1) [although I think convention dictates that you plot 0.5 to 1 to show the median? A few papers I've read have done this]?? BUT, I would like a symbol like // (but

[R] Identifying points in a plot that have duplicate values

2007-03-05 Thread David Lloyd
I have code like this: - #--- -- x=scan() 0 0 0 0 0 1 2 3 4 y=scan() 1 1 1 2 2 1 3 4 5 plot(x,y) identify(0,1,3) #Allows me to select manually to identify co-ordinate (0,1)