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
Plotting coeffcients after SuestHi, I would like to plot the coefficients with confidence intervals for coefficients from different…
Program Graph: Allowing for Varying Number of VariablesDear Statalisters, I would like to write a program that automatically plots the means of variables …
Multiple imputation using endogenous covariatesHallo, my topic is rather of econometric nature than a pure Stata question: When applying regressio…
Fixed Effects Regression with Panel Data N>TI am doing a fixed effects regression with 5465 N and 5 T on Stata. I have used the fixed effects re…
Dropping observations of a string variable that contain numbersHi, I want to analyse a very large dataset for which I want to look into the different categories of…
Subscribe to:
Post Comments (Atom)
0 Response to Collect recode problem
Post a Comment