Timeline for How to choose initial values for nonlinear least squares fit
Current License: CC BY-SA 3.0
25 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 25, 2015 at 22:54 | history | edited | Glen_b | CC BY-SA 3.0 | added 52 characters in body |
| Dec 15, 2014 at 3:04 | comment | added | Glen_b | @gung Adding the code formatting and fitting it in the window is nice, thanks. I wouldn't have worried about aligning the <- (for myself, I find that more distracting than illuminating, akin to fully justified text), but I wouldn't change it, since it's probably better for most people your way. | |
| Dec 15, 2014 at 2:58 | comment | added | gung - Reinstate Monica | I added R code formatting & tweaked it to fit in the window & be aligned, @Glen_b. I think it will be easier to read this way. If you don't like it, roll it back with my apologies. | |
| Dec 15, 2014 at 2:57 | history | edited | gung - Reinstate Monica | CC BY-SA 3.0 | added code formatting; aligned code |
| Jul 2, 2013 at 6:59 | history | edited | Glen_b | CC BY-SA 3.0 | made it clear the first set of parameter values were those used to generate the data |
| Jul 2, 2013 at 4:02 | comment | added | Fixed Point | @Glen_b Sorry, I would have posted earlier but it was sleepy time in my part of the world. I have made an extensive addendum to my post with everything you asked for. Your edits are useful. It might be helpful to the community and mostly me (for future reference if nothing else) to keep your first two edits as they are and then add a third one. No doubt your answers will change based on my addendum. Thanks again for your time. | |
| Jul 1, 2013 at 16:27 | history | edited | Glen_b | CC BY-SA 3.0 | added R code |
| Jul 1, 2013 at 15:57 | history | edited | COOLSerdash | CC BY-SA 3.0 | added 7 characters in body |
| Jul 1, 2013 at 15:54 | comment | added | whuber♦ | That was the first thing I thought about, too. My reasoning at the time, which has been borne out by simulations (which include tests where $B$ is near the extremes of the domain), is that in most cases you can still get reasonable starting values for the parameters, regardless of where the bump is. The crux of the matter is identifying $B$, I believe: after that the fitting procedure should have little trouble estimating the other parameters. | |
| Jul 1, 2013 at 15:50 | comment | added | Glen_b | @whuber +1 Indeed; I started with using just the points at the end for the linear fit but stopped when I realized I had no good basis to think the Gaussian bump wasn't close enough to the end to lift it badly. That was actually one reason why I asked the OP for some of that domain knowledge that would help so much. | |
| Jul 1, 2013 at 15:41 | comment | added | whuber♦ | +1 I have had good success using a slightly simplified version of this. Instead of Theil regression, just fit a line using the most extreme points to the right and left (3 at each end does well). After subtracting that line and closely smoothing, the range of the smooth estimates $|A|$, the location of the maximum estimates $B$ (assuming $A\gt 0$), and $C$ can be estimated from the proportion of smoothed values exceeding some sizable fraction of $A$, such as $1/4$. You need to do this twice: once assuming $A\gt 0$ and again (with suitable changes) assuming $A\lt 0$. | |
| Jul 1, 2013 at 14:33 | comment | added | Glen_b | @FixedPoint Please see my updated post. | |
| Jul 1, 2013 at 14:32 | history | edited | Glen_b | CC BY-SA 3.0 | added algorithm |
| Jul 1, 2013 at 9:48 | comment | added | Glen_b | @FixedPoint I am not sure you should have awarded the tick yet; more information is needed for a good answer. I think I have a potentially decent way of getting rough estimates of perhaps D,E, A and B, but it needs more information to make sure my simulated data is of the right kind. | |
| Jul 1, 2013 at 9:44 | comment | added | Glen_b | @FixedPoint It may eventually happen that either that will need to be closed or deleted or this one merged with it, but to begin with it has some information that isn't here. I think we can worry about getting this cleaned up once we have all the information in one place. | |
| Jul 1, 2013 at 8:06 | comment | added | Fixed Point | @Glen_b Undeleted it is. | |
| Jul 1, 2013 at 7:55 | comment | added | Glen_b | I'd really rather you hadn't deleted it. It contains information that isn't in your present question, for starters. | |
| Jul 1, 2013 at 7:55 | vote | accept | Fixed Point | ||
| Jul 1, 2013 at 7:54 | comment | added | Fixed Point | Yep, I did post this question on mathoverflow just to see if anyone else had any ideas but since this question has migrated here I'll delete the older question. Thank you both @NickCox and Glen_b. | |
| Jul 1, 2013 at 7:53 | history | edited | Glen_b | CC BY-SA 3.0 | added 78 characters in body |
| Jul 1, 2013 at 7:44 | comment | added | Nick Cox | Quite so. I missed the earlier post at stats.stackexchange.com/questions/61724/… | |
| Jul 1, 2013 at 7:41 | comment | added | Glen_b | @NickCox It comes down to the range of problems encountered - if I recall right from earlier posts, the OP gets huge numbers of these problems, but I didn't recall seeing enough detail to make good suggestions before, though I invested a bit of time playing around with potential approaches (which didn't yield anything definitive enough to post). The OP likely has the kind of domain knowledge that could yield good start values that solve his or her problems almost always. | |
| Jul 1, 2013 at 7:37 | comment | added | Nick Cox | +1. Repeating the fit a thousand times and choosing the best (if I understand that correctly) sounds a strange idea: nonlinear least squares should converge if the model is reasonable for the data and there are good initial values. Naturally, the second is what you are asking about. But it seems pessimistic to imply that you might need to choose different starting values for each fit. | |
| Jul 1, 2013 at 7:34 | history | edited | Nick Cox | CC BY-SA 3.0 | added 1 characters in body |
| Jul 1, 2013 at 7:21 | history | answered | Glen_b | CC BY-SA 3.0 |