chjackson / flexsurv

The flexsurv R package for flexible parametric survival and multi-state modelling
http://chjackson.github.io/flexsurv/
55 stars 27 forks source link

Flexsurvreg: error in optim when using dist="genf" #8

Closed jrdnmdhl closed 8 years ago

jrdnmdhl commented 8 years ago

I've been getting an error when running flexsurvreg using the Generalized F distribution. The error appears to be coming from within the optim call.

Initially found this in the fork I was working on. I then confirmed that it also exists on the latest version of flexsurv-dev. The same code runs fine on the CRAN version.

flexsurvreg(Surv(rectime,censrec)~1,data=bc,dist="genf")

Error in if (any(pmax < pmin)) browser() : missing value where TRUE/FALSE needed

chjackson commented 8 years ago

Fixed now - thanks. The current code should pass R CMD check. I'd just forgotten to take out some debugging code.

Chris

On 16/01/16 18:14, Jordan Amdahl wrote:

I've been getting an error when running flexsurvreg using the Generalized F distribution. The error appears to be coming from within the optim call.

Initially found this in the fork I was working on. I then confirmed that it also exists on the latest version of flexsurv-dev. The same code runs fine on the CRAN version.

|flexsurvreg(Surv(rectime,censrec)~1,data=bc,dist="genf") |

Error in if (any(pmax < pmin)) browser() :
missing value where TRUE/FALSE needed

— Reply to this email directly or view it on GitHub https://github.com/chjackson/flexsurv-dev/issues/8.

Christopher Jackson chris.jackson@mrc-bsu.cam.ac.uk Senior Statistician, MRC Biostatistics Unit, Institute of Public Health, Robinson Way, Cambridge, UK, CB2 0SR. +44 (1223) 330381