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),
0 Response to command table with option markvar(newvar) creates error __000001 not found
Post a Comment