I'd like to calculate the percentage share of "experience" a member has in its project. I have prepared the following example data in dataex:
Code:
* Example generated by -dataex-. To install: ssc install dataex
* dataex project time exp_member1 exp_member2 exp_member3 exp_member4 exp_member5 exp_member6
clear
input str4 project byte(time exp_member1 exp_member2 exp_member3 exp_member4 exp_member5 exp_member6)
"ava" 3 1 2 3 1 . .
"ava" 4 2 3 4 2 . .
"ava" 5 3 4 5 3 . .
"neta" 1 1 1 . . . .
"neta" 2 2 2 . . . .
"beta" 4 4 3 4 2 4 4
"beta" 5 5 4 5 3 5 5
"beta" 6 6 5 6 4 6 6
end
expprop_member1 = 0.14
expprop_member2 = 0.29
expprop_member3 = 0.43
expprop_member4 = 0.14
expprop_member5 = .
expprop_member6 = .
Is there an easy way to do this? I have a total of approximately 12,900 observations and am using Stata 16.
Thank you very much for your advice in advance.
Maja
0 Response to Gen Variable: Percentage Share (Row)
Post a Comment