i have been trying to make a foreach command to estimate all 6 types of copula models. But I am having syntax issues that I wasn't able to solve it.
Any help, I would appreciate it.
That's my code:
Code:
local maxll=minfloat() foreach cop in gaussian frank clayton gumbel joe indep { local xvars boy age govaid urb nowi bicop status s `xvars´, copula(`cop´) estimates store `cop´ if e(ll)>`maxll´&e(converged) { local maxll=e(ll) local bestcop="`cop´" matrix bestb=e(b) } } estimates stats _all
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(status s boy) double age byte(govaid urb nowi) 3 0 0 13.4 0 0 0 2 0 1 13.6 0 1 0 2 0 1 13.8 0 1 0 3 1 1 14.1 0 0 0 3 1 1 14.3 0 0 0 3 1 1 14.1 0 1 0 3 1 1 14 0 0 0 3 1 0 14 0 1 0 3 1 1 13.9 0 1 0 3 0 1 13.8 0 0 0 3 1 0 13.7 0 1 0 3 1 0 13.7 0 0 0 3 1 1 13.8 0 1 0 3 1 0 14.1 0 1 0 1 1 0 14.2 0 1 0 3 1 0 14.1 0 0 0 3 1 0 14.3 0 0 0 3 1 1 14.3 0 1 0 3 1 0 13.8 0 1 0 3 1 1 13.8 0 1 0 3 0 0 13.9 0 1 0 3 1 1 13.9 0 1 0 3 1 0 14.1 0 1 0 3 1 0 14.5 0 1 0 3 1 1 14.6 0 1 0 3 1 0 14.3 0 0 0 3 1 0 14.5 0 0 0 2 1 1 13.8 0 1 0 3 1 0 14.2 0 0 0 3 1 0 13.6 0 0 0 end
0 Response to foreach copula command* - Syntax error
Post a Comment