[R] 'rms' package error

Kevin E. Thorpe kevin.thorpe at utoronto.ca
Thu Apr 3 14:17:03 CEST 2014

On 04/02/2014 10:29 PM, Lucy Leigh wrote:
> Hi everyone,
> I am attempting to use the R package 'rms'
> http://biostat.mc.vanderbilt.edu/wiki/Main/Rrms
> to implement a PH weibull model, using the pphsm() function.
> However, I get the following error,
> f.ph <- pphsm(f)
> Warning message:
> In pphsm(f) :
>    at present, pphsm does not return the correct covariance matrix
> I tried simply running the example on page 117 of the manual, i.e.
> set.seed(1)
> S <- Surv(runif(100))
> x <- runif(100)
> dd <- datadist(x); options(datadist='dd')
> f <- psm(S ~ x, dist="exponential")
> summary(f) # effects on log(T) scale
> f.ph <- pphsm(f)
> ## Not run: summary(f.ph)
> But I still got the above error message.
> I have looked through the R help archives, and it appears that this question has been asked before in 2011, but
> there were no replies.
> http://r.789695.n4.nabble.com/HELP-td3494640.html
> Does anyone know how to get this function to work? Or if there is an alternative package that can implement
> a Weibull PH model?
> Cheers,
> Lucy

Maybe I'm missing something, but since the AFT and PH models intersect 
in the weibull distribution, why not just use the psm() function to fit 
the parametric model. You can still obtain hazard ratio estimates from 
that model with a little bit of calculation (e.g. exp(-beta/scale)).

Kevin E. Thorpe
Head of Biostatistics,  Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.thorpe at utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016

More information about the R-help mailing list