Closed tku23 closed 1 year ago
Hi there, Just wanting to provide an update. I've managed to solve Gompertz by using method="Nelder-Mead". I came across the optim page and wanted to know why does flexsurvreg uses BFGS as the default? Will this "bias" the results by doing Nelder-Mead for one distribution and BFGS for the rest?
For log-logistic, I still couldn't solve it despite trying all the different methods. Do you have any suggestions I could try? Thank you.
I found this "If 'false' convergence is reported with a non-positive-definite Hessian, then consider tightening the tolerance criteria for convergence" - how do I tighten the tolerance criteria? https://rdrr.io/cran/flexsurv/man/flexsurvreg.html
There isn't necessarily going to be a solution. The likelihood surface that it is trying to maximise might just be too flat, so that there is no meaningful maximum. This usually happens when the data don't contain sufficient information about the parameters of the model.
BFGS is used as a default because it makes use of the gradient of the log-likelihood, which makes optimisation faster. In well-behaved problems, all optimisers should give the same answer. If they don't, then the answer with the higher likelihood (lower minus log likelihood) should be preferred.
Go to help(optim) as the manual page suggests - see "reltol" and "abstol". For example, flexsurvreg(..., control=list(reltol=1e-16)
, though this might not make any difference.
Hi there,
I am new to R and have attempted my first use of flexsurvreg (which is amazing!). However, I encountered the below warnings for log logistic and Gompertz. Had no issue with the other functions and they fit the data very well (exponential, Weibull, lognormal and generalised gamma). Could anyone kindly provide any advice on how I can overcome this issue?
I have even tried the control = fnscale…, but it didn't work. When I tried plotting the curves using lines( ), it looks way off from the original data and something just doesn't seem right.
Much appreciated and thank you