I am using Stata 17 and I’d like to produce a frequency table (tabulate one way) based on multiple variables that have been manually encoded from an open survey-question.
Since respondents have given multiple answers to that question, each person in the dataset has five variables named “encoding_t1” to “encoding_t5” that relate to that same open question. Therefore, a value like 101 encoding for example “cultural related activities”, or 102 encoding "religious related activities" can occur in every single one of these variables - same for every other value of the code scheme.
The frequency table I'd like to produce, should, however, not provide only statistics (like number of observations, percentages) on one variable (e.g. encoding_t1), but should provide information on all of these variables, since I would like to know how many respondents engage in cultural activities or religion activities overall.
Is there a way to produce a variable set where I can get statistics on responses from all these variables in one table? Or do I have to produce a dummy-variable for every possible value from encoding_t1 to encoding_t5?
Related Posts with Tabulation based on multiple categorical variables
Tobin's QHi all, I am trying to merge two data sets from Compustat to get Tobin's Q. I try to merge the two …
How to loop element-by-element operations (e.g regression)Hello, I am trying to find a way to loop element by element operations across two lists of variables…
reshape / transpose large dataset for mergingI am constructing a large timeseries dataset, with cases arranged around WDI_code (World Development…
How to repeat some command linesHello all, I need to repeat 3 line of commands in stata to create updated observations for three va…
cannot compute an improvement -- discontinuous region encounteredI am trying to build a multilevel model with the governrate-level indicators, but I get this problem…
Subscribe to:
Post Comments (Atom)
0 Response to Tabulation based on multiple categorical variables
Post a Comment