Hello,
I'm trying to create a new variable that is equal to the sum of several other variables. The several variables I need to sum are each 0,1 dichotomous variables (yes/no) and each correspond to a different event. They each ask whether the respondent received medical treatment following the event. I'm trying to create a variable that shows how many respondents received medical treatment within my sample, among all events. I had previously generated a variable that showed individuals who received "any" medical treatment, but that would only count each respondent once even if they reported Yes to receiving medical treatment following more than one event.
If there is a straightforward way to do this, please let me know!
Related Posts with Sum Data from multiple variables
import data from excel to stata-change the structure of the dataHi, I have a data file in excel which includes more than 300 firms. Information for each firm inclu…
Combining three byte variables into oneI am currently trying to replicate some of the results of the Charles and Guryan 2008 paper 'Prejudi…
Separating cumulative data into actualsHi all First of all, apologies if I am not able to explain this very well. I am very new to Stata a…
Proportion experiencing event under competing-risks regressionHi, I am looking at the results of a three-arm clinical trial, where a secondary outcome is the occ…
Syntax for lincom won't work in Stata 16 but works fine in Stata 15Hello all. I'm a professor at Baldwin Wallace. On Thursday, I tried to run a lab with my class from …
Subscribe to:
Post Comments (Atom)
0 Response to Sum Data from multiple variables
Post a Comment