Dear All,

I estimate different panel data models and then I try to export the results to excel using xml_tab user-written command (I know that there are possibly better ways to do that including the new table command. But I have been using xml_tab for so many years that I am familiar with it).

When doing so, I receive the following error message:

Code:
year: factor variable base category conflict
My estimates include year dummies, which I introduce via i.year. I understand the meaning of that message. In fact, I checked my estimates and 4 of them contains year dummies from 1993 to 2013, while one containes year dummies from 1989 to 2013. What I cannot understand is why this error message pops up. . The command I use to export results is:

Code:
xml_tab     tab4_a tab4_b tab4_c tab4_d_1 tab4_d_2 tab4_d_3, title ("Tab4") wide below sd
                 stats (N r2_p) font ("dcr10" 11) sheet(mytable)
                 keep ($H $ownH lncr lnlev lnfm lnrg_cap_r lnta) notes("None.")
                 save("Tables\Tables.xml")
As you can see I am not including any time dummy in the tables. Instead, I specify only the variables that I want to display - see keep ($H $ownH lncr lnlev lnfm lnrg_cap_r lnta), where $H and $ownH are some global macros, which do not contain any time dummy. So:

1) Do you have any idea why this happens;

2) How can I fix it?

Thanks in advance,

Dario