Dear all,
I want to run some regressions with year, industry and country fixed effects. However, I would like to include a time trend in each regression. The process goes as follows, I want to estimate how the shares of employment in high tech industries are explained by the level of human capital within the country. My data is:
I would like to include not only year fixed effects but also a time trend (this shares of employment are expected to follow a linear trend over time). So, far the specifications without time trends go as follows:
How could I include the time trend in these regressions? Thank you!
I want to run some regressions with year, industry and country fixed effects. However, I would like to include a time trend in each regression. The process goes as follows, I want to estimate how the shares of employment in high tech industries are explained by the level of human capital within the country. My data is:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float country1 int year str2 isic float tech_intensity long Employment float(share_emp hc) 8 1985 "15" 1 . . 2.2555776 8 1986 "15" 1 . . 2.30544 8 1987 "15" 1 . . 2.3564048 8 1988 "15" 1 28488 .124983 2.408496 8 1989 "15" 1 33285 .13802098 2.461739 8 1990 "15" 1 34191 .13564035 2.516159 8 1993 "15" 1 15100 .2557978 2.5148826 8 1994 "15" 1 7220 .1970309 2.514457 8 1995 "15" 1 4515 .2089407 2.514032 8 1996 "15" 1 5836 .24414323 2.5811894 8 1997 "15" 1 8599 .3785937 2.634504 8 1998 "15" 1 4316 .11582224 2.68892 8 1999 "15" 1 4032 .13085386 2.74446 8 2000 "15" 1 3919 .12122993 2.8011475 8 2001 "15" 1 3144 .10250057 2.81509 8 2002 "15" 1 3790 .10898948 2.8291016 8 2003 "15" 1 3965 .10707534 2.843183 8 2004 "15" 1 4599 .12050308 2.857335 8 2005 "15" 1 5230 .13512117 2.871557 8 2006 "15" 1 5503 .13065362 2.878032 8 2007 "15" 1 6532 .13651279 2.8845215 8 2008 "15" 1 6243 .1298569 2.8910255 8 2009 "15" 1 6832 .14407423 2.8975446 8 2010 "15" 1 7208 .13335307 2.904078 8 2011 "15" 1 7804 .14119776 2.9106934 8 2012 "15" 1 8202 .14464334 2.917346 8 2013 "15" 1 8784 .14344972 2.924037 8 2014 "15" 1 8970 .13227747 2.930766 8 2015 "15" 1 11287 .15261777 2.9375334 8 2016 "15" 1 14582 .16869505 2.944339 8 2017 "15" 1 15307 .16537024 2.951184 8 2018 "15" 1 16373 .1655996 2.9580684 8 2019 "15" 1 17426 .1656039 2.964992 8 1985 "16" 1 . . 2.2555776 8 1986 "16" 1 . . 2.30544 8 1987 "16" 1 . . 2.3564048 8 1988 "16" 1 . . 2.408496 8 1989 "16" 1 . . 2.461739 8 1990 "16" 1 . . 2.516159 8 1993 "16" 1 2253 .03816639 2.5148826 8 1994 "16" 1 1311 .035776664 2.514457 8 1995 "16" 1 976 .04516637 2.514032 8 1996 "16" 1 2148 .08985944 2.5811894 8 1997 "16" 1 1946 .0856778 2.634504 8 1998 "16" 1 1399 .03754294 2.68892 8 1999 "16" 1 1137 .03690001 2.74446 8 2000 "16" 1 899 .02780957 2.8011475 8 2001 "16" 1 546 .017800672 2.81509 8 2002 "16" 1 418 .012020475 2.8291016 8 2003 "16" 1 374 .010099919 2.843183 8 2004 "16" 1 253 .00662911 2.857335 8 2005 "16" 1 240 .006200589 2.871557 8 2006 "16" 1 188 .0044635436 2.878032 8 2007 "16" 1 174 .0036364396 2.8845215 8 2008 "16" 1 147 .003057659 2.8910255 8 2009 "16" 1 123 .002593842 2.8975446 8 2010 "16" 1 185 .00342263 2.904078 8 2011 "16" 1 104 .001881672 2.9106934 8 2012 "16" 1 92 .001622432 2.917346 8 2013 "16" 1 144 .002351635 2.924037 8 2014 "16" 1 273 .004025836 2.930766 8 2015 "16" 1 . . 2.9375334 8 2016 "16" 1 . . 2.944339 8 2017 "16" 1 . . 2.951184 8 2018 "16" 1 . . 2.9580684 8 2019 "16" 1 . . 2.964992 8 1985 "17" 1 . . 2.2555776 8 1986 "17" 1 . . 2.30544 8 1987 "17" 1 . . 2.3564048 8 1988 "17" 1 61728 .27081406 2.408496 8 1989 "17" 1 65344 .27095816 2.461739 8 1990 "17" 1 73034 .28973582 2.516159 8 1993 "17" 1 7946 .13460724 2.5148826 8 1994 "17" 1 3338 .09109268 2.514457 8 1995 "17" 1 172 .007959646 2.514032 8 1996 "17" 1 106 .0044344044 2.5811894 8 1997 "17" 1 960 .04226654 2.634504 8 1998 "17" 1 10082 .27055603 2.68892 8 1999 "17" 1 8223 .26686788 2.74446 8 2000 "17" 1 8717 .26965076 2.8011475 8 2001 "17" 1 8562 .279138 2.81509 8 2002 "17" 1 11638 .3346753 2.8291016 8 2003 "17" 1 10479 .28298676 2.843183 8 2004 "17" 1 10213 .2676012 2.857335 8 2005 "17" 1 10018 .25882292 2.871557 8 2006 "17" 1 9807 .2328403 2.878032 8 2007 "17" 1 12639 .26414344 2.8845215 8 2008 "17" 1 13162 .27377486 2.8910255 8 2009 "17" 1 11845 .2497891 2.8975446 8 2010 "17" 1 14105 .2609524 2.904078 8 2011 "17" 1 14172 .25641397 2.9106934 8 2012 "17" 1 15088 .26607883 2.917346 8 2013 "17" 1 15873 .25921872 2.924037 8 2014 "17" 1 18485 .27259186 2.930766 8 2015 "17" 1 981 .013264644 2.9375334 8 2016 "17" 1 991 .0114646 2.944339 8 2017 "17" 1 1449 .015654372 2.951184 8 2018 "17" 1 1943 .01965187 2.9580684 8 2019 "17" 1 2068 .01965275 2.964992 8 1985 "18" 1 . . 2.2555776 end
Code:
reg share_emp hc resources i.year i.country1 i.isic1 if tech_intensity==1,robust
Code:
reg share_emp hc resources i.year i.country1 i.isic1 if tech_intensity==3,robust
Comment