nls((mortalityof2018)~(i+g*h^age),start = list(g=1,h=1,i=1))
Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates
Everytime i enter the above code i get an error saying singular gradient matrix at initial parameter estimates.please help. for reference both mortalityof2018 and age is a vector containing 111 values
PS= im trying to fit makeham model(A+B*c^x) to mortalityof2018 and therefore trying to estimate the parameters using nls