I have here a Steam Dataset which includes individual steam user and their playtimes(overall) and the games they played. I further divided the player in hardcore(=1) and casual player (=0). Overall I want to test how various factors have influence on the overall playtime of the players, but now I want to build 2 regressions, one for hardcore players and one for casual players(because I think that the effect of every factor can differ between those two). But in order to do that, I need the sum of the overall playtime from the 2 subgroups. I tried
, but the outcome just doesn't make sense. How can I aggregate the sum of playtime only for each subgroup?
Here is a example from the dataset
Code:
egen playtime_type = sum(playtime_sum), by (hightype)
Here is a example from the dataset
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str17 steamid float(playtime_sum hightype) "76561197960265729" 0 0 "76561197960265730" 45 0 "76561197960265730" 45 0 "76561197960265730" 45 0 "76561197960265733" 1710 0 end

Comment