Dear Statalist,
I would appreciate your help on the following.
I use factor variable notation in the following way and I specify a base category; however, Stata drops the wrong, in this example, year.
For whatever reason, I do not obtain the right base category.
When I run it with the full dataset, I get all interactions of year with ukb, but 2020.year#1.ukb is omitted rather than 2013.year#1.ukb.
I am not sure why this is the case and would greatly appreciate your help.
Best,
Nico
I would appreciate your help on the following.
I use factor variable notation in the following way and I specify a base category; however, Stata drops the wrong, in this example, year.
Code:
regress temp ib2013.year#i.ukb ib1000.country ib2013.year if year<=2020
When I run it with the full dataset, I get all interactions of year with ukb, but 2020.year#1.ukb is omitted rather than 2013.year#1.ukb.
I am not sure why this is the case and would greatly appreciate your help.
Best,
Nico
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(temp year ukb country) 0 2015 0 5 0 2017 0 10 1 2015 0 14 0 2016 0 18 0 2012 0 19 0 2012 0 22 0 2012 0 26 0 2010 0 26 1 2013 0 27 0 2020 0 265 0 2011 0 309 0 2012 0 386 0 2014 1 1000 0 2014 1 1000 0 2009 1 1000 0 2019 1 1000 0 2011 1 1000 0 2011 1 1000 0 2010 1 1000 0 2013 1 1000 1 2011 1 1000 0 2015 1 1000 0 2013 1 1000 0 2018 1 1000 0 2019 1 1000 0 2011 1 1000 0 2015 1 1000 0 2018 1 1000 0 2015 1 1000 0 2016 1 1000 0 2020 1 1000 0 2013 1 1000 0 2017 1 1000 0 2011 1 1000 1 2015 1 1000 0 2012 1 1000 0 2014 1 1000 1 2012 1 1000 0 2009 1 1000 0 2019 1 1000 0 2012 1 1000 0 2013 1 1000 0 2013 1 1000 0 2010 1 1000 0 2016 1 1000 0 2020 1 1000 0 2019 1 1000 0 2011 1 1000 0 2010 1 1000 0 2016 1 1000 0 2014 1 1000 0 2013 1 1000 1 2009 1 1000 0 2020 1 1000 0 2017 1 1000 0 2020 1 1000 0 2015 1 1000 0 2015 1 1000 0 2014 1 1000 0 2012 1 1000 0 2017 1 1000 0 2018 1 1000 0 2012 1 1000 0 2011 1 1000 0 2010 1 1000 0 2015 1 1000 0 2010 1 1000 0 2018 1 1000 0 2012 1 1000 0 2010 1 1000 0 2019 1 1000 0 2014 1 1000 0 2017 1 1000 0 2019 1 1000 0 2019 1 1000 0 2015 1 1000 0 2010 1 1000 0 2012 1 1000 0 2010 1 1000 0 2014 1 1000 0 2019 1 1000 0 2011 1 1000 0 2012 1 1000 0 2010 1 1000 0 2016 1 1000 0 2012 1 1000 0 2017 1 1000 0 2011 1 1000 0 2010 1 1000 0 2021 1 1000 0 2012 1 1000 0 2012 1 1000 0 2011 1 1000 0 2017 1 1000 0 2018 1 1000 0 2010 1 1000 1 2010 1 1000 0 2009 1 1000 0 2015 . . 0 2012 . . end
Comment