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"
Panel data dummyDear all, I have a question regarding my research into the influence of political factors on econom…
Multi-response variablesHello, I would like to calculate how the overall prevalence rates of different health conditions ha…
Stata command error - "Effect size and confidence intervals invalid: order should be {effect size, lower ci limit, upper ci limit}"Hi, I am using Stata 15 (64-bit). I am meta-analysing hedges g effect sizes (CI 95%). When I trans…
Title for graphDear all, im trying to combine to graphs and adding different titles to each one in the combined gr…
Unexplained component in oaxaca decompositionHi Statalisters, I am using Ben Jann's excellent "oaxaca" command. I have a question regarding inte…
Subscribe to:
Post Comments (Atom)
0 Response to MATA Error "Nothing found where while expected"
Post a Comment