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"
Change of direction of OR in logistic regressionDear stata users, I am not an expert concerning statistics, so I hope to find some answers in this …
Using stata to choose between tobit and double hurdle modelsHi Dear users of statalist forum, I am working on double hurdle model to specify factors affecting a…
swilk test linear regressionHey guys, I did a linear regression analysis and checked for the normality assumption. The plot (qn…
quick help on identifying the first admission dateHey there, I have a dataset consisting of the two variables below (ID-number and admission date) wi…
Statistical Analysis with Control and treatment groupI would like some advice on what statistical analysis to use to test my hypothesis. I have two group…
Subscribe to:
Post Comments (Atom)
0 Response to MATA Error "Nothing found where while expected"
Post a Comment