I have the following data set:
Parent Subsidiary Variable Value
US UK revenue 10
US FRA revenue 15
. . . .
. . . . .
US ESP profit 5
US UK profit 2
. . . .
. . . .
FRA US revenue 20
FRA UK revenue 15
. . . .
. . . .
FRA ESP profit 2
FRA LUX profit 10
I want to calculate the share of revenue that US parent companies have in the UK, FRA, and other countries. The figure for the UK then would be 10/(10+15+...). I want to do likewise for profits (and other variables).
I also want to do this for all countries - ie the share of French parent companies´ revenues that is generated in Spain, Luxembourg and other countries.
I´m guessing I might have to do loops, which I´m not really familiar with.
Related Posts with Generate variable (maybe needs a loop)
Ordering legend only in graphI am trying to order the legend with the better outcome group up top in the legend and the worse out…
cluster/village fix effectsDear Stata users, I am trying to estimate the impact of water quality on child health in 3 Asian co…
Start-of period controls in first difference estimationDear Stata-Users, I am currently trying to understand the econometrics of the Paper of Dippel et al.…
Undiscovered mistake in regression with interaction termHey everyone. I'm having troubles with the outcome of a linear regression model, since I expected s…
Multiply and add Code: * Example generated by -dataex-. For more info, type help dataex clear input float(time accp …
Subscribe to:
Post Comments (Atom)
0 Response to Generate variable (maybe needs a loop)
Post a Comment