I am having problem using nonlinear least squares. It seems to work when I
do the programming, I do not get any "error message" when running the
funtion that I have programmed. The problem occure when I try to estimate
the function. I even have used one of the examples from the "reference
guide" to see if it was my function that was the problem, but the result is
the same, I get an error message. My programming for the example from the
book looks like, where x is my dependent varialbe:
program define nltest
version 7.0
if "`1�" == "?" {
global S_1 "B0 B1"
global B0=1
global B1=.1
exit
}
replace `1�=$B0*(1-exp(-$B1*x))
end
I then give the command,
nl test y
which produces the error message:
nltest refused query, rc=198
r(196);
Under r(196) one can read, "Your nlfunc program did not work properly with
the nl command."