Hello,
I have 10 numeric variables: offense1-offense10. Each one can take a specific value of between 1 and 700. I want to create 5 variables that sums the total of 5 specific numeric observations across all 10 of the offense variables.
For example, if offense1, offense2, and offense8=20, I want to create a new variable indicating that the value 20 occurred 3 times. Obviously egen rowtotal would give me the value 60, but I'm looking for occurrences, not totals.
Thanks!
Related Posts with summing occurrence of numeric variables
how to categorize into categorical variables based on the cut-points where the observed distribution crosses over the normal distribution?Hi everyone! I am looking for some advice on how to categorize into categorical variables of differ…
Dropping every ID when respondent go from "work" to "retirement"Hi In the data below the ID's is sorted in Waves (years). The Retirement variable can take 3 values…
Obtain same results with regress and rifhdregHi everyone, I am trying to make a RIF regression analysis using an inequality index that uses two…
Control time effects for quarterly dataHi everyone, I'm a student and I am quite new to Stata. I'm doing my thesis and being stuck at this…
xtlogit and excluding ineligible participantsHi Listers, I have collected data of people who want to join the gym at 4 regular intervals. At eac…
Subscribe to:
Post Comments (Atom)
0 Response to summing occurrence of numeric variables
Post a Comment