[R] Joint confidence interval for fractional polynomial terms

2012-01-09 Thread Eleni Rapsomaniki
it, but is there a mathematical solution? Many thanks Eleni Rapsomaniki Medical Statistician UCL, London __ 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

Re: [R] Joint confidence interval for fractional polynomial terms

2012-01-09 Thread Eleni Rapsomaniki
one plots the fitted function results are just as hard to interpret. That's why the simultaneous CI plot will be very useful. Eleni On Jan 9, 2012, at 8:45 AM, Eleni Rapsomaniki e.rapsoman...@ucl.ac.uk wrote: Dear R users, The package 'mfp' that fits fractional polynomial terms to predictors

[R] mfp package - can I exclude some powers?

2011-12-06 Thread Eleni Rapsomaniki
Hi, The mfp package suggests fractional polynomial transformations for non-linear predictors. For continuous variables that take negative values the suggested transformations tend to look ugly, e.g. if x1 is the original variable it is transformed to something like: (x1+5.67)^1 * log(x1+5.67),

[R] survConcordance with 'counting' type Surv()

2011-07-08 Thread Eleni Rapsomaniki
data (counting) fit2 - coxph(Surv(age,age+time2, status) ~ ph.ecog +ph.karno+pat.karno+meal.cal+wt.loss + age + sex, lung2) survConcordance(Surv(time, status) ~predict(fit2), lung2) Many thanks Eleni Rapsomaniki Research Associate Department of Public Health and Primary Care University

[R] UnoC function in survAUC for censoring-adjusted C-index

2011-06-24 Thread Eleni Rapsomaniki
0 This is a potentially very useful function so it would be great if someone could explain the behaviour here. Many thanks Eleni Rapsomaniki Research Associate/Statistician Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge

[R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2010-12-10 Thread Eleni Rapsomaniki
1.64669e-10 Many thanks for any help you may be able to provide. Eleni Rapsomaniki Research Associate University of Cambridge Institute of Primary and Public Health __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] divide grid.newpage into two?

2010-07-19 Thread Eleni Rapsomaniki
=) #they are superimposed... which is not what I want. Any hints/ideas much appreciated! Many thanks Eleni Rapsomaniki Research Associate Department of Public Health and Primary Care University of Cambridge __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Running cumulative sums in matrices

2010-04-14 Thread Eleni Rapsomaniki
a matrix: m1=cbind(1:5,1:5,1:5) #The aim is to create a new matrix with every column containing the cumulative sum of all previous columns. m2=m1 for(i in 2:ncol(m1)){ m2[,i]=apply(m1[,1:i],1,sum) } m2 Many thanks in advance Eleni Rapsomaniki Research Associate Strangeways Research Laboratory

Re: [R] Running cumulative sums in matrices

2010-04-14 Thread Eleni Rapsomaniki
That's really interesting... I have always assumed that for-loops take longer than apply. Perhaps it depends on the application. I'll try both in my code and see. Thank you! Eleni Rapsomaniki Research Associate Tel: +44 (0) 1223 740273 Strangeways Research Laboratory Department of Public

[R] Calibration score for survival probability

2009-11-23 Thread Eleni Rapsomaniki
observed probabilities). Any other functions I should be aware of? Also, has anybody come across an implementation of the statistic described in: A global goodness of fit statistic for Cox regression models by Parzen Lpisitz, Biometrics 55, 1999 Many thanks in advance Eleni Rapsomaniki Research

Re: [R] Calibration score for survival probability

2009-11-23 Thread Eleni Rapsomaniki
information than a single statistic anyway!). I will try the updated version in the rms package to compare. Best Wishes Eleni Rapsomaniki Research Associate Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge -Original Message- From

[R] update.formula drop interaction terms

2009-10-13 Thread Eleni Rapsomaniki
, ~ . -A) #gives me this: #Surv(time, status) ~ x1 + x2 + x3 + x4 + B + x5 + strata(sex) + A:x3 + A:x4 + B:x5 #but I want this: #updated.forml=as.formula(Surv(time, status) ~ x1+x2+x3+x4+B*x5+strata(sex)) Any ideas? Thanks in advance Eleni Rapsomaniki Research Associate Strangeways Research Laboratory

[R] turning off specific types of warnings

2009-05-20 Thread Eleni Rapsomaniki
linear.predictors=) for better estimates. I would like to turn this specific warning off, as it makes it difficult to detect other (potentially more crucial) warnings generated by other parts of my code. Is there a way to do this? Eleni Rapsomaniki Research Associate Strangeways Research Laboratory

[R] pooled mean

2009-04-16 Thread Eleni Rapsomaniki
Dear R users, Is there an R function to compute the pooled mean? Many Thanks Eleni Rapsomaniki  __ 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

Re: [R] Competing risks Kalbfleisch Prentice method

2009-03-27 Thread Eleni Rapsomaniki
for either cause (perhaps a parametric model could be used in this case). But then again, this was not an issue wtih my data. Eleni Rapsomaniki Research Associate Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge -Original Message- From

Re: [R] Competing risks Kalbfleisch Prentice method

2009-03-26 Thread Eleni Rapsomaniki
(people who die from competing causes remaining in the risk set) are theoretically sound. If anybody is interested in the Kalbfleisch Prentice based cumulative incidence adjusting for competing risks with covariates, I'm happy to supply the code. Eleni Rapsomaniki Research Associate Tel

Re: [R] Competing risks Kalbfleisch Prentice method

2009-03-26 Thread Eleni Rapsomaniki
Rapsomaniki Research Associate Tel: +44 (0) 1223 740273 Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge -Original Message- From: Ravi Varadhan [mailto:rvarad...@jhmi.edu] Sent: 26 March 2009 14:36 To: Eleni Rapsomaniki; 'Arthur

[R] Competing risks Kalbfleisch Prentice method

2009-03-25 Thread Eleni Rapsomaniki
, cause=k1|x)=Sum(u=0, ..., u=t) {hazard_k(u;x)*S(u;x)} where S(u;x) = exp{-sum_of_k(sum(hazard_k(u))} I have searched extensively for an implementation of this in many packages, but it appears that more complex approaches are more commonly implemented, such as timereg package. Eleni

[R] Competing risks adjusted for covariates

2009-02-27 Thread Eleni Rapsomaniki
to adjust for more than one covariate (it allows you to stratify by a single grouping vector). Any help/tips will be extremely appreciated. Eleni Rapsomaniki Research Associate Cambridge [[alternative HTML version deleted]] __ R-help@r-project.org

[R] C-index for models fitted using start, stop in Surv?

2009-02-25 Thread Eleni Rapsomaniki
computing it myself? Many Thanks Eleni Rapsomaniki Research Associate Strangeways Research Laboratory Department of Public Health and Primary Care University of Cambridge   __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] C-index for models fitted using start, stop in Surv?

2009-02-25 Thread Eleni Rapsomaniki
rcorr.cens is not meant for that. Thank you for the clarification. On a second thought, I think (hope) a time-dependent AUC index should be more appropriate in this case, such as survivalROC. Many many thanks for all your help! Eleni Rapsomaniki Research Associate Tel: +44 (0) 1223

[R] Age as time-scale in a cox model-How to calculate x-time risk?

2009-02-18 Thread Eleni Rapsomaniki
do I get the equivalent risks from the two models? Any tips greatly appreciated!! (FYI A related entry to my question can be found at: http://tolstoy.newcastle.edu.au/R/e2/help/07/02/9831.html) Eleni Rapsomaniki Research Associate Department of Public Health and Primary Care University

[R] How do i compute predicted failure time from a cox model?

2009-02-16 Thread Eleni Rapsomaniki
), or hazard etc, which is what I get from survest and predict for example. I suspect the answer is embarrassing simple... Eleni Rapsomaniki Research Associate Strangeways Research Laboratory Department of Public Health and Primary Care [[alternative HTML version

[R] How do i compute predicted failure time from a cox model?

2009-02-16 Thread Eleni Rapsomaniki
), or hazard etc, which is what I get from survest and predict for example.   I suspect the answer is embarrassing simple... (BTW sorry for the duplicate email, the earlier HTML version of my message could not be viewed) Eleni Rapsomaniki   Research Associate Strangeways Research Laboratory Department

[R] Using subset in validate() in Design, what is the correct syntax?

2009-02-06 Thread Eleni Rapsomaniki
Hi I am trying to understand how to get the validate() function in Design to work with the subset option. I tried this: ovarian.cph=cph(Surv(futime, fustat) ~ age+factor(ecog.ps)+strat(rx), time.inc=1000, x=T, y=T, data=ovarian) validate(ovarian.cph) #fine when no subset is used, but

[R] See source code for survplot function in Design package

2009-02-05 Thread Eleni Rapsomaniki
Dear R users, I know one way to see the code for a hidden function, say function_x, is using default.function_x (e.g. summary.default). But how can I see the code for imported packages that have no namespace (in this case Design)? Many Thanks Eleni

[R] survfit using quantiles to group age

2009-02-02 Thread Eleni Rapsomaniki
(time,status) ~ quantile(age,3), data=veteran) #will not work ideally I would like to superimpose estimates from cph models, which automatically fit the 2nd to 4rth quantiles for age, so I need the age groups to be grouped the same. Any help greatly appreciated! Eleni Rapsomaniki

[R] Confidence intervals for beta distribution

2008-01-03 Thread Eleni Rapsomaniki
distribution? Many Thanks in advance, Eleni Rapsomaniki __ 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

[R] Who uses R?

2007-09-25 Thread Eleni Rapsomaniki
than Excel would be very much appreciated. Many Thanks Eleni Rapsomaniki __ 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