Dear All,
I was trying to estimate a non-linear least squares regression and found the following discussion from April 2008.
http://lists.wfu.edu/pipermail/gretl-users/2008-April/002337.html
I changed the code, so that it would accommodate my “model”. All Xi’s as well as Y are time series. Unfortunately, when I estimate the model, I get an error: b1: expect scalar or vector.
nls Y= w1*X1+ w2*X2 + w3*X3 + w4*X4 + w5*X5 + w6*X6
w1=b1^2
w2=b2^2
w3=b3^2
w4=b4^2
w5=b5^2
w6=1-w1-w2-w3-w4-w5
params b1 b2 b3 b4 b5
end nls
After this, I tried to define arbitrary scalars as starting values (no theory, just numbers that came to my mind)
scalar b1=0.1
scalar b2=0.2
scalar b3=-0.05
scalar b4=0.03
scalar b5=-0.015
and re-estimated the model, which delivered an output as well. However, I expected slightly different results, considering above mentioned post. Given that w6 was defined as 1 minus all the others, I expected positive coefficient estimates.
I am not sure, what went wrong, I suppose it’s my model (which I likely set up very badly), but would nonetheless be grateful for any useful comments.
Thanks in advance and kind regards,
Jan