Closed sbihorel closed 10 months ago
scale
is the location parameter in the Weibull distribution, so by specifying Surv(recyrs, censrec) ~ group
you have already placed the group
covariate on this parameter. The parameter_name(covariate_name)
syntax is for ancillary parameters such as shape, not location parameters. The behaviour of flexsurv is undefined when you put the name of a location parameter in this syntax.
Thanks for this report anyway - I shall leave it open, because ideally flexsurv should have given you an informative error or warning message to explain the problem.
Thanks for your feedback. That's really useful.
A warning is now given in https://github.com/chjackson/flexsurv/commit/dd26c86391b6c9c69233383d857d09bc5ab56107
Hi
While trying to fit a flexsurvreg model using a Weibull distribution and testing covariates on ancillary parameters, I stumbled what looks like a bug... Adding factor or character covariate on the scale parameter returns and error. Adding a numeric variable on scale does not. Since this is my first foray in parametric survival analysis, I'd like to know if I am doing things wrong or if there is indeed a bug
Reprex:
Thanks