Hello,

I'm trying to run FD and FE on my dataset. The results are supposed to be the same but somehow I got different results. I tried to search through the forum but none answers seem to work for me

Most of the posts are about running FD for 2 periods only. However, my dataset is a quarterly firm data from 2000 to 2020 (example as below) so I'm confused as how to handle this case
id datafqtr leverage_w roa_w tangible_asset_w loga_w mtb_w
1004 2000Q1 0.459628 0.022102 0.267899 7.428392 1.064293
1004 2000Q2 0.474785 0.024161 0.264232 7.470167 1.056531
1004 2000Q3 0.491826 0.024168 0.252283 7.51147 0.827076
1004 2000Q4 0.565849 0.01265 0.210245 7.639642 0.669796
1013 2000Q1 0.230647 0.053458 0.189184 7.503576 5.52596
1013 2000Q2 0.27006 0.059736 0.158362 7.793863 7.693741
1013 2000Q3 0.286014 0.054107 0.124066 8.294374 7.455397
1013 2000Q4 0.266415 0.053318 0.15328 8.286647 4.158207
I'm using the following commands

Code:
xtset gvkey_num qdate
reg D.(leverage roa tangible_asset loga mtb)
xtreg leverage roa tangible_asset loga mtb, fe
I tried to include the time dummy in the FD but got the following error message:

Code:
reg D.(leverage roa tangible_asset loga mtb)
the 'D' operator is not allowed with factor variables
r(198);
Any advice is greatly appreciated! Thank you!