Hello, statalist community! I am trying to generate the network effect for every unique user.
Here is a sample from my dataset, which has over 32 million observations and 13.160,547 unique users.
So the steamid appering several times is not a problem of duplicate, it is because of the different games this id owns.
What I am trying to do here is to caculate the networkeffect every unique user has by extracting the beta_coef from each
which should be run for every user.
What I have tried is:
But I have only received the same value.
I think there is something wrong with
but I don't know what I can do.
I really appreciate any help!
Thanks a lot in advance!
Ji
Here is a sample from my dataset, which has over 32 million observations and 13.160,547 unique users.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str17 steamid long appid float(number_of_games friends) "76561197960265729" 60 1 1 "76561197960265730" 340 3 1 "76561197960265730" 220200 3 1 "76561197960265730" 235620 3 1 "76561197960265733" 3320 5 3 "76561197960265733" 70 5 3 "76561197960265733" 1500 5 3 "76561197960265733" 214420 5 3 "76561197960265733" 30 5 3 "76561197960265738" 50 3 1 end
What I am trying to do here is to caculate the networkeffect every unique user has by extracting the beta_coef from each
Code:
reg number_of_games friends
What I have tried is:
Code:
foreach i of var steamid{ 2. reg number_of_games friends 3. gen networkeffect = _b[friends] 4. }
I think there is something wrong with
Code:
foreach i of var steamid
I really appreciate any help!
Thanks a lot in advance!
Ji
Comment