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)
Multi-level Linear Mixed Model - Correcting for multiple comparisonsHi, a first-time Statalist forum post for me! As part of my PhD studies, I've ran a Multi-level Lin…
save data in different file on the basis of variable valuesi have about 100 files similar to below example: I want to save this data in different files on the …
Bin widths are not constant in histogramDear StataList, I have a question regarding bin width in histograms. I cannot manage to create bin…
probit regressionHey Guys, I am trying to fit a probit regression. Where I use adtitional control variables such as …
Help: OS, HR and CI 95%Good morning guys, I need some clarification about overall survival, hazard ratio and C.I.95%. I wou…
Subscribe to:
Post Comments (Atom)
0 Response to Generate variable (maybe needs a loop)
Post a Comment