just a quick question. Is it possible to use foreach within a mata function?
Suppose I have something lke:
Code:
mata:
foreach v of global regressors{
    D = 1 :/ W_`v'
    W_`v'2 =  editmissing(1 :/ (D:^2), 0)
}
end
Code:
. mata:
------------------------------------------------- mata (type end to exit) -----------------------------------
: foreach v of global regressors{
'global' found where almost anything else expected
(3 lines skipped)
-------------------------------------------------------------------------------------------------------------
Thanks in advance.
0 Response to Foreach in mata
Post a Comment