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"
Scaling fitted values obtained from first stage of IVHi everyone: I am running the following regression where I instrument my binary endogenous treatmen…
How to create control group against fraud firms?Dear all, I want to create a control sample of non-fraud firms against firms that committed fraud. I…
Multiple time-failure analysis, event-specific coeffcients?Dear all, I am using stcox along with a stratification variable to estimate the hazard functions fo…
Reducing repeated responses to find actual sample size from a multiple imputed datasetHi there I am hoping someone can advise me on this complex dataset that is derived from a dual frame…
svy: tabulate seems to misprint the extended missing value .zHello Statalist members, I am using Stata 17 (ver.10May2022). I found that svy: tabulate doesn't se…
Subscribe to:
Post Comments (Atom)
0 Response to MATA Error "Nothing found where while expected"
Post a Comment