[R] Error messages with psm and not cph in Hmisc

Frank E Harrell Jr f.harrell at Vanderbilt.Edu
Thu May 6 05:00:57 CEST 2010


On 05/05/2010 11:29 AM, David Foreman wrote:
> While
>
> sm4.6ll<-fit.mult.impute(Surv(agesi, si)~partner+ in.love+ pubty+ FPA+
> strat(gender),fitter = cph, xtrans = dated.sexrisk2.i, data =
> dated.sexrisk2, x=T,y=T,surv=T, time.inc=16)
>
> runs perfectly using Hmisc, Design and mice under R11 run via Sciviews-K,
> with
>
> library(Design)
> library(mice)
> ds2d<-datadist(dated.sexrisk2)
> options(datadist="ds2d")
> options(contrasts=c("contr.treatment","contr.treatment"))
>
> the equivalent
>
> sm4.6ll<-fit.mult.impute(Surv(agesi, si)~partner+ in.love+ pubty+ FPA+
> strat(gender),fitter = *psm*, xtrans = dated.sexrisk2.i, data =
> dated.sexrisk2, x=T,y=T,surv=T, time.inc=16)
>
> returns the error message
>
> Error in  dimnames(X)<- list(rnam, c("(Intercept)", atr$colnames)) :
>    length of 'dimnames' [2] not equal to array extent
>
>
> Using survreg{survival} for which psm is a wrapper, also runs perfectly on
> the unimputed dataset.
>
> Is this a bug, or am I doing something wrong?  I particularly want to make
> use of Design's validation and calibration utilities on multiply imputed
> data.
>
> With many thanks for everyone's help
>
> David Foreman

The rms and Design packages do not support the user specifying a 
contrast option.

validate and calibrate function do not explicitly support multiple 
imputation.

Think about converting the the rms package.

Frank

> Consultant and Visiting Professor in Child and Adolescent Psychiatry
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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, reproducible code.
>


-- 
Frank E Harrell Jr   Professor and Chairman        School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list