How to get standards errors of the parameters of a non-linear model (R and Excel) I am working on the movement of fish species from the centre of a protected area to a non-protected area. Based on the article by R. Abesamis, itself inspired by the work of B. Kaunda-Arar (page 91), I applied to my dataset a logistic decay D = 1/(1+exp(S*(I-d)) where D is the proportion of biomass in the middle of the reserve, d is the distance from the centre of the protected area, S is the slope and I is the inflection point. The parameters to be estimated in this model are S and I. However, I had to use Excel to estimate these parameters because the nls function in R was giving me constant error messages (the well-known singular gradient error). I successfully estimated S and I using the Excel solver, but I need to know the standard errors of these parameters. For this, the article states that a linearization of my logistic model is necessary, but despite my research on this subject I do not understand how to do this.
My questions are therefore the following:

*

*Is it possible to get the standard error of my parameters directly from Excel? If so, how?

*If this is not possible in Excel, how can I get the standard errors of my S and I parameters in R? (note: using the nls function, even when applying the values obtained by my Excel model as starting values for S and I, the gradient error message is still displayed. Same thing when using nlsLM.)


The model
$$y = \frac{1}{1+e^{S(I-x)}}$$
can be reparametrised with $I = -a/b$ and $S=b$ as
$$y = \frac{1}{1+e^{-(a+bx)}}$$
This can be solved with GLM using a logit link function. Then you can use the estimates of $a$ and $b$ to compute the estimates of $I$ and $S$ and use the Delta method to compute the error. Or potentially you use nls with the GLM result as start conditions (although in this approach there would be smarter, faster, methods to generate starting conditions) to have nls compute the Hessian, which can be used as an approximation of the error (you could also derive this Hessian analytically).

Note: these estimates for the error assume that your data points are independent. This may not need to be the case. For instance, if the data points are a time series then likely the error terms are correlated.
Also, the error might not need to be with equal variance for different values of $x$. Does nls (assuming Gaussian errors with equal variance) make sense? In this case it may be easier to use a Monte Carlo method, which allows you to use whatever structure for the errors of the data and create a straight forward estimate of the fitted coefficients by simulations.
Another addition, if your model is misspecified, then estimates of the variance based on the Hessian or residual variance are not correct. This will overestimate the variance/error of the estimates. (In your case you might for instance think about a missing baseline term which causes such misspecification)
