Hi,
I estimate the following regression:
where YEAR=2000, 2001,...,2005 and AGE = 0,1,2,...,99. So 2001 becomes the base year.
I then like set the year-dummies to zero and predict the value of the outcome for each year based on AGE. My idea was to use something like:
However, stata returns:
So I guess I cannot set the dummies to zero by using i2000.YEAR=0. How can I address factor variables in the margins command?
Thanks a lot!
I estimate the following regression:
Code:
reg Y ib2001.YEAR i.AGE,
I then like set the year-dummies to zero and predict the value of the outcome for each year based on AGE. My idea was to use something like:
Code:
margins, by(YEAR) at(i2000.YEAR=0 i2002.YEAR=0 i2003.YEAR=0 i2004.YEAR=0 i2005.YEAR=0)
HTML Code:
at values for factor Event do not sum to 1
Thanks a lot!
Comment