Raja, Dr. Edwin Amalraj
2018-Mar-18 15:26 UTC
[R] selectFGR - variable selection in fine gray model for competing risks
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 variable in 'selectFGR' function. The following R code is produced below for reproducibility. library(riskRegression) library(pec) dat <-data(Melanoma,package="riskRegression") Melanoma$logthick <- log(Melanoma$thick) f1 <- Hist(time,status)~age+sex+epicel+ulcer df1 <-FGR(f1,cause=1, data=Melanoma) df1 df <-selectFGR(f1, data=Melanoma, rule ="BIC", direction="backward") Thanks in advice for your suggestion. Is there any alternative solution ? Regards Amalraj raja The University of Aberdeen is a charity registered in Scotland, No SC013683. Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir. SC013683.
Thomas Alexander Gerds
2018-Mar-19 07:33 UTC
[R] selectFGR - variable selection in fine gray model for competing risks
Dear Raja the technical problem is that the function crrstep does not communicate the selected variables in a proper way. the function pec::selectFGR uses rownames(crrstep.fit$coefficients). the other problem is that I don't like and never use backward elemination -- so, I am not motivated to fix this. However, I copy this email to Rob van Kruijsdijk who wrote the function ... maybe he wants to fix. you can always fix this yourself by copying the functions selectFGR, predictEventProb.selectFGR. Best Thomas "Raja, Dr. Edwin Amalraj" <amalraj.raja at abdn.ac.uk> writes:> 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 variable in 'selectFGR' function. The following R code is > produced below for reproducibility. > > library(riskRegression) > library(pec) > dat <-data(Melanoma,package="riskRegression") > Melanoma$logthick <- log(Melanoma$thick) > f1 <- Hist(time,status)~age+sex+epicel+ulcer > df1 <-FGR(f1,cause=1, data=Melanoma) > df1 > df <-selectFGR(f1, data=Melanoma, rule ="BIC", direction="backward") > > Thanks in advice for your suggestion. Is there any alternative solution ? > > Regards > Amalraj raja > > > The University of Aberdeen is a charity registered in Scotland, No SC013683. > Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir. SC013683.-- 7LL-4 No one is the reason for your happiness except you yourself.
Seemingly Similar Threads
- selectFGR vs weighted coxph for internal validation and calibration curve- competing risks model
- selectFGR - variable selection in fine gray model for competing risks
- help on drawing right colors within a grouped xyplot (Lattice)
- "order" issue
- restricted cubic spline in FGR function