Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: problem with function evaluator program in nl comand
From
Miguel Ampudia Fraile <[email protected]>
To
statalist <[email protected]>
Subject
st: problem with function evaluator program in nl comand
Date
Thu, 21 Mar 2013 12:00:46 +0100
Dear all,
I want to use a function evaluator program within the nl command to do
an estimation but I keep getting an error message saying to check
whether my program is a function evaluator program.
I have taken my program to the simplest case possible and I have
followed the examples in the help file step by step. And I keep
getting the same error. Any help would be much appreciated. Here is my
code:
capture program drop nlweight4
program nlweight4
version 11
syntax varlist (min=2 max=2)[aw fw iw] if, at(name)
local assetsinstock : word 1 of `varlist'
local logincome : word 2 of `varlist'
tempname A beta1
scalar `A' = `at'[1,1]
scalar `beta1' = `at'[1,2]
replace `assetsinstock' = `A' +`beta1'*`logincome' `if'
end
And then I run:
nl weight4 @ assetsinstock logincome, {parameters(A beta1)} initial(A
1 beta1 1 )
Best,
Miguel
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/