This question from several years back describes the "singular gradient matrix at initial parameter estimates" error.
The answers say the reason for the error is that the parameters in the model are not identifiable.
I am trying to use nls in a nonlinear predictive model, that looks something like a neural network, so I don't care about parameter identifiability, just predictive performance. Right now I am using optim and it is painfully slow. I was hoping to use nls instead. Is it true that nls will not work in any case where the parameters are not identifiable?
optim
? How do they perform? I believe nonlinear least squares is still estimated by a root-finding equation, so you should be implementing this procedure withuniroot
or a direct Gauss Newton implementation. $\endgroup$