Hi, new to stata!
Struggling to figure out how to include fixed effects for industry country and time in my regression. I am trying to find out, after controlling for industry, country, and year, the effect that internet usage rates have had on exports, and I want to understand how this effect differs according to how technology-intensive the industry is.
I have export data for every country, over 5 years broken down by industry (99 industries) - and for each industry I also have a corresponding industry R&D intensity variable (1-4). I also have data on %internet users by country for each year.
sample: country_code 4:afghanistan. country_code 8:albania.
Again, trying to control for fixed country, time, and industry effects, and see w
YTCI =alphaCT + betaIT + gammaCI + (Dintensity * deltausers_CT)
where:
alphaCT is the term for country year fixed effects, which I generated using egen c_y = group (country_code year), label
betaIT is the term for industry year fixed effects, which I generated using egen i_y = group (industry_code year), label
gammaCI is the term for country industry fixed effects, which I generated using egen c_i = group (country_code industry_code), label
Dintensity is a dummy for industry intensity
deltausers_CT is country time investment in IT
I can't use fixed effects panel data form what i understand, because my variables for industry intensity are constant over time, so they get omitted. Even then, I have to first group (country_industry), and then set xtset country_industry year.
I tried to run it as reg log_exports i_y c_i c_y internet_users i.intensity does this approach make sense to any others? I don't know if what I am doing here actually "controls" for industry-year, country-industry and country-year effects. I got the following results

a) is this even correct
b) could I run it instead with areg? If so, how?
Struggling to figure out how to include fixed effects for industry country and time in my regression. I am trying to find out, after controlling for industry, country, and year, the effect that internet usage rates have had on exports, and I want to understand how this effect differs according to how technology-intensive the industry is.
I have export data for every country, over 5 years broken down by industry (99 industries) - and for each industry I also have a corresponding industry R&D intensity variable (1-4). I also have data on %internet users by country for each year.
sample: country_code 4:afghanistan. country_code 8:albania.
year | country_code | industry_code | intensity | exports_usd | internet_users |
1998 | 4 | 19 | 2 | 209823 | .15 |
1998 | 4 | 20 | 4 | 23423 | .15 |
1998 | 4 | 21 | 3 | 988474 | .15 |
1998 | 4 | 22 | 2 | 3344 | .15 |
1998 | 4 | 23 | 1 | 134523 | .15 |
1998 | 8 | 19 | 2 | 46578435 | .22 |
1998 | 8 | 20 | 4 | 555675 | .22 |
1998 | 8 | 21 | 3 | 3837 | .22 |
1998 | 8 | 22 | 2 | 863522 | .22 |
1998 | 8 | 23 | 1 | 43355 | .22 |
2002 | 4 | 19 | 2 | 435246 | .18 |
2002 | 4 | 20 | 4 | 445554 | .18 |
YTCI =alphaCT + betaIT + gammaCI + (Dintensity * deltausers_CT)
where:
alphaCT is the term for country year fixed effects, which I generated using egen c_y = group (country_code year), label
betaIT is the term for industry year fixed effects, which I generated using egen i_y = group (industry_code year), label
gammaCI is the term for country industry fixed effects, which I generated using egen c_i = group (country_code industry_code), label
Dintensity is a dummy for industry intensity
deltausers_CT is country time investment in IT
I can't use fixed effects panel data form what i understand, because my variables for industry intensity are constant over time, so they get omitted. Even then, I have to first group (country_industry), and then set xtset country_industry year.
I tried to run it as reg log_exports i_y c_i c_y internet_users i.intensity does this approach make sense to any others? I don't know if what I am doing here actually "controls" for industry-year, country-industry and country-year effects. I got the following results
a) is this even correct
b) could I run it instead with areg? If so, how?
Comment