I Am getting the following error with fitting with FOCEI. Kindly explain the error and give the solution how to resolve the same.
Warning: Terminated early due to NaN in gradient.
└ @ Optim /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Optim/V8ZEC/src/multivariate/optimize/optimize.jl:98
ERROR: cannot assign a value to imported variable StatsAPI.fit from module Main
The warning is not necessary a problem. The optimiser just got inte a bad place of the parameter space and often finds its way out of there just fine. The problem here is that you’re trying to overwrite the fit function with the fit result when you call fit = fit(.....). Try simply using a different name to assign the fit output to.