David Foreman
2010-Dec-02 13:20 UTC
[R] problem with package rsm: running fit.mult.impute with cph
Hi all (and especially Frank), I'm trying to use x=T, y=T in order to run a validated stepwise cox regression in rsm, having multiply imputed using mice. I'm coding model.max<-fit.mult.impute(baseform,cph,miced2,dated.sexrisk2,x=T,y=T) baseform is baseform<-Surv(si.age,si=="Yes")~ peer.press + copy.press + excited + worried + intimate.friend + am.pill.times + info.parents + info.teacher + info.sch.nurse + info.friends + info.media + info.clinic + info.gp + info.fpa + info.chemist + nearer.clinic + uti + thrush + herpes + love + strat(gender) + Own.space + ordered(Chat.Mother) + ordered(Chat.Father) + ordered(Prts.interested) + ordered(Someone.stands.up.4u) + Thought.runaway + as.numeric(Prts.know.location)+ pubty + partner + arguments + mfqc.total + esteem.total + events.total + bmi This gives the error message Error in 1:n.impute : NA/NaN argument In addition : Warning message: In 1:n.impute : numerical expression has 130 elements: only the first used :> It doesn't seem to be a singularity problem, as the simple equation model.test<-fit.mult.impute(Surv(si.age,si=="Yes")~peer.press,cph,miced2,dated.sexrisk2,x=T,y=T) gives an identical message, and the code runs perfectly in either without x=T, y=T PS the dataset is 827 rows x 130 variables. [[alternative HTML version deleted]]
Frank Harrell
2010-Dec-02 21:13 UTC
[R] problem with package rsm: running fit.mult.impute with cph
rms and fit.mult.impute don't necessarily play well with mice. Note also that you will need a special adjustment for variances for having done stepwise regression. One approach is to insert a zero for a coefficient every time that variable is not 'selected', then compute the sample variance of the beta hats and zeros [using the bootstrap]. Frank ----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/problem-with-package-rsm-running-fit-mult-impute-with-cph-tp3069319p3070218.html Sent from the R help mailing list archive at Nabble.com.
Apparently Analagous Threads
- Last post: problem with package rsm: running fit.mult.impute with cph -- sorry, package was rms
- Error messages with psm and not cph in Hmisc
- accessing ylim set by xyplot
- RE: Samba 'make install' chokes on textproc/expat2 & now openldap
- how to do model validation and calibration for a model fitted by fit.mult.impute?