Why do the commands table and table twoway with the option markvar(newvar)create the error "__000001 not found r(111);"? The error occurs in Stata/MP 18.0 for Windows (64-bit x86-64) and also in Stata/MP 17.0 on the same platform.
The Stata 18 help files say:
.
Yes, the table and table twoway option markvar(newvar) does what the help files say but why does it also create an error? It is possibly my user error (despite being a long-time user-programmer),
Code:
. use https://www.stata-press.com/data/r18/nhanes2l, clear (Second National Health and Nutrition Examination Survey) . table sex, markvar(mynewvar) --------------------- | Frequency ---------+----------- Sex | Male | 4,915 Female | 5,436 Total | 10,351 --------------------- __000001 not found r(111); . noisily table sex diabetes, markvar(mynewvar2) -------------------------------------------- | Diabetes status | Not diabetic Diabetic Total ---------+---------------------------------- Sex | Male | 4,698 217 4,915 Female | 5,152 282 5,434 Total | 9,850 499 10,349 -------------------------------------------- __000001 not found r(111); . tab mynewvar mynewvar2, missing | mynewvar2 mynewvar | 0 1 | Total -----------+----------------------+---------- 1 | 2 10,349 | 10,351 -----------+----------------------+---------- Total | 2 10,349 | 10,351
markvar(newvar) generates an indicator variable that identifies the observations used in the tabulation
Yes, the table and table twoway option markvar(newvar) does what the help files say but why does it also create an error? It is possibly my user error (despite being a long-time user-programmer),
Comment