I need to create a total variable that will sum the code frequencies from each response variable.
I have q25_* which asks respondents to indicate which advice sources they use
There are 15 different response options and respondents may choose up to 15 answers.
The attached image represents how this data has been inputted to STATA
n = 100 for q25_O1 spread across codes 1 - 15
n = 76 for q25_O2 spread across codes 1 - 15 (76 out of the 100 respondents chose more than one answer)
etc...
I want to create a variable that sums each of the response codes for each of q25_* and this will generate a cumulative frequency, eg n = 100 + 76 + n3 + n4 etc... spread across response options 1 - 15
Is someone able to help with syntax to generate this variable?
Related Posts with Combining values for multicode response variables to create a new cumulative variable
create a matrixHi all, This might be a trivial question but whatever I have tried seems not working. (e.g. looping…
Problems with local macros in finding an excel fileHello Statalisters, I've being working all day in a code and i couldn't make it work. Because i'm re…
Randomly Assigning TreatmentI have person-year level data, and I am utilizing DiD that exploits state-level shocks. Each person …
Calculating residuals in a multinomial regression as part of 2SRII am attempting to do a 2 stage residual inclusion (2SRI) model where the first stage is estimating …
Double fixed effects Yes/No with estoutI need to declare two fixed effects at bottom of regression table, but second fixed effect (Time FE)…
Subscribe to:
Post Comments (Atom)
0 Response to Combining values for multicode response variables to create a new cumulative variable
Post a Comment