The second one IS indeed weighted least square.
Two weights namely (sigma1, sigma2)**2 are from first step.
There are 2 rough assumptions here,
1) the boundary of two region(time period) is known or determined very subjective. You can argue it is a period problems, etc.
2) within each period the variance is constant.
If you want to estimate all parameters(A, B, sigma1, sigma2) together. I do think proc nlin will do it. You have to write it in other packages, Such as, proc IML, or optmodel.
|