[R] Syntax for iter.max in rms

Mike Harwood harwood262 at gmail.com
Sun May 8 15:27:53 CEST 2011


Hello,

I would like to increase the number of iterations for running a
Buckley-James regression model in the rms package, but something is
apparently syntactically wrong.  The following code initially is
exactly as it appears in the help page (which runs successfully), then
a "failure to converge" message (resulting from specifying an
'identity' link argument, the error message by adding both the
iter.max control and 'identity' link arguments, and finally, the error
message when testing just an iter.max argument.

This was run in R 2.13.0 with rms version 3.3-0 on Ubuntu Linux 11.04.

Thank you in advance, and all insights and criticisms are appreciated.

Mike

library(rms)
> f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital,x=TRUE, y=TRUE)
> f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, link='identity',x=TRUE, y=TRUE)

No convergence in 50 steps
Failure in bj.fit
> f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, link='identity', iter.max=200, x=TRUE, y=TRUE)
Error in bj(Surv(ftime, stroke) ~ rcs(age, 5) + hospital, link =
"identity",  :
  unused argument(s) (iter.max = 200)
> f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, iter.max=200, x=TRUE, y=TRUE)
Error in bj(Surv(ftime, stroke) ~ rcs(age, 5) + hospital, iter.max =
200,  :
  unused argument(s) (iter.max = 200)



More information about the R-help mailing list