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

Non-conformable arrays in hsurvspline when q includes 0 #11

Closed jrdnmdhl closed 8 years ago

jrdnmdhl commented 8 years ago

Repro:
survObj = flexsurvspline(Surv(rectime,censrec)~1,data=bc) summary(survObj, t=0:10, type = "hazard")

Error:

Error in dbasis(knots, tsfn(x, timescale)) * gamma : non-conformable arrays

Looks like the issue is line 163 of hsurvspline. Some of the components of the product are being filtered using the selector vector 'ind', whereas others are not.