Dear all,
Im currently working with a panel datatset covering automation risk on occupational- and country-level.
As potentional instrument I would like to use the average automation risk of surrounding countries.
Therefore I need to generate a variable that would calculate the mean of the surrounding countries automation risk, by each year for each country (which has a different set of surrounding countries)
Sadly I have been unable to find a solution for this as of yet
Thanks in advance
Related Posts with Generating mean variable by subgroup
To replicate Gabaix and Landier (2007 OJE)Hi Now I replicate Gabaix and Landier (2007 OJE). What they did is to run the following regression …
Title on second y-axis when using by-optionHi, Any suggestions on how to put a title on the second y-axis when combining multiple y-axes with …
Interpretation coefficient Latent profile analysis with a mixture of continuous and dummy variablesDear Stata users, I am running a Latent profile analysis using a mixture of continuous and dummy var…
GLS Estimation in Eaton-Kortum (2002): Two-componet error and importer- and exporter- FE interpretationDear Stata users, I am using Eaton and Kortum (2002) General Equilibrium model, so I have to estima…
Calculate number of firms based on condition Code: +----------------------------------------------------+ | id year country …
Subscribe to:
Post Comments (Atom)
0 Response to Generating mean variable by subgroup
Post a Comment