[R] restricted cubic spline in FGR function

2018-03-23 Thread Raja, Dr. Edwin Amalraj
Dear Thomas, I want to use evaluate effect of Age using restricted cubic form in the FGR function as Fgr.crr <- FGR(Hist(time, event) ~ rcs(Age_years), data=dat) It provides error. " Error in parse(text = termtext, keep.source = FALSE): 1: response ~ rcs(Age_years Do I need to

Re: [R] exporting data to stata

2018-03-22 Thread Raja, Dr. Edwin Amalraj
Hi , library(foreign) write.dta(data1, "data1.dta") should work. The file will be saved in the working directory. Use getwd() to know the working directory. Best wishes Amalraj Raja -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of rosario scandurra

[R] selectFGR vs weighted coxph for internal validation and calibration curve- competing risks model

2018-03-21 Thread Raja, Dr. Edwin Amalraj
? Thank you very much for all your inputs and suggestions Regards Amalraj raja -Original Message- From: Ronald Geskus [mailto:statist...@inter.nl.net] Sent: 21 March 2018 04:01 To: r-help@r-project.org Cc: Raja, Dr. Edwin Amalraj <amalraj.r...@abdn.ac.uk> Subject: Re: [R] sel

[R] selectFGR - variable selection in fine gray model for competing risks

2018-03-18 Thread Raja, Dr. Edwin Amalraj
Dear All, I would like to use R function 'selectFGR' of fine gray model in competing risks model. I used the 'Melanoma' data in 'riskRegression' package. Some of the variables are factor. I get solution for full model but not in variable selection model. Any advice how to use factor

Re: [R] Competing risks - calibration curve

2018-02-16 Thread Raja, Dr. Edwin Amalraj
L, estimates=TRUE, bw=FALSE, aics=0, what="observed-predicted", tol=1e-12, maxdim=5) plot(cal, subtitles=FALSE) plot(cal) cal.km <- calibrate(mod, u=1, cmethod='KM', m=10, B=10, pr=FALSE) plot(cal.km) cal.hare = calibrate(mod, u=1, cmethod='hare', m=20, B=20) plot(cal.h

[R] Competing risks - calibration curve

2018-02-16 Thread Raja, Dr. Edwin Amalraj
Dear R users, I am new to R and wanted to apply competing risk methods in my research work. I used the R code given by Zhang et al in his paper 'Nomogram for survival analysis in the presence of competing risks published in Ann Trans Med 2017:5(20):403. I am struggling with getting