Hi
I am working with the new table and collect command in STATA 17.
After I recode levels of a dimension, the "collect dims" command shows that the dimension has both oldlevel and newlevel.
how can I remove old levels?
This is the code used in STATA table-document:
use https://www.stata-press.com/data/r17/nhanes2l
collect clear
sort sex region
collect: by sex region: summarize weight
collect dims
collect recode sex 1 = Male 2 = Female
collect dims
The result of "collect dims" :
before recode:
Array
After recode:
Array
as you can see, sex dimension has 2 levels before but 4 levels after recode.
I will appreciate any comment.
cheers
Related Posts with Collect recode problem
Pooling dataHi everyone. I have a question on how pooling data in stata. I am working with a repeated cross-sect…
Identify observations appeared in the previous yearDear All, I find this question here. The data set is Code: * Example generated by -dataex-. To inst…
ArdlHello STATA users, what technics can be used to fix heteroskedasticity in ARDL model besides droppin…
Parallel trends assumption with continuous treatment variable - DiDHi, I have survey data on individual firms from 2008-2017. I want to test how a reform that happene…
Generating Probabilities from RangeHi everyone, I have question regarding how to calculate probabilities from data. My idea is to crea…
Subscribe to:
Post Comments (Atom)
0 Response to Collect recode problem
Post a Comment