I am studying from the STATA guide.
I typed MATA and then copied and entered the following command as shown in the entry for STATA:
: real matrix id(real scalar n)
{
real scalar i
real matrix res
res = J(n, n, 0)
for (i=1; i<=n; i++) {
res[i,i] = 1
}
return(res)
}
:
: I3 = id(3)
: I3
Which gives the error: nothing found where 'while' expected
r(3000);
Any help is much appreciated.
Related Posts with MATA Error "Nothing found where while expected"
sign restrictionsSuppose, I have a model like, -ASSET SALES =a*x1+b*CASH FLOWS. Kindly note the sign of dependent var…
Two wave panel data and mediation analysis: methodological challengesHi List, I'm having some methodological challenges that I hope you can help me out with. I'm resear…
standard deviation and standard error as variablesHello every one, please i want to create variable which comes from standard deviation and standard …
Identify missings in spellDear all, my data structure looks like this hhid id year 100 1 1 100 . 1 100 3 1 100 1 2…
Merlin packageI am assessing the merling package in Stata 14.2 for a "three-level survival model" and a "joint fra…
Subscribe to:
Post Comments (Atom)
0 Response to MATA Error "Nothing found where while expected"
Post a Comment