Hello. I am working on a database that has a variable called 'sector' (string) and another one called 'code_sector' (long). Using the codebook command, I check for the unique values in each variable, and I get that there are 52 unique values in sector and 30 unique values in code_sector.
So I think there are some misspellings in the sector variables. Next, I use bysort code_sector: replace sector = sector[1] to correct the misspellings by only keeping the first name of the sectors with the same code. So far so good. But, when I use codebook again, it says that there now are just 29 unique values in the variable sector! How is that possible? One thing is that when running codebook on sector, it says ' warning: variable has embedded blanks' (it is true, the names of the sectors have spaces, but I guess it should not cause problems with this).
Thanks in advance
Related Posts with Problem using codebook
Time dummies in IV regression and interpretation of post-estimationDear All, I am running on Stata 14.0 an ivregress 2sls estimation as in the following code. Code: …
Rubustness Check in Panel Data Modelling: Sensitivity Analysis Modifying the Level of AggregationDear Statalist participants, I am running a panel data modeling in the municipality level of aggreg…
Which regression model to use for zero-inflated distribution?Hello, I have a question regarding which type of regression model is right to use for a zero-inflat…
r(table) : when did this thing appear, why were we not told about it, and where is it documented?Good morning, Recently I (by chance) discovered that e-class commands such as -regress-, -probit-, …
conformability error in variance() and quadvariance() Is there a limit on the number of columns of the matrix we can pass to either variance() or quadva…
Subscribe to:
Post Comments (Atom)
0 Response to Problem using codebook
Post a Comment