Hi all, I have a problem with margins after having run Correia's (2017) reghdfe command.
First of all, here are my data:
My data are xtset:
I have run the following regression using Correia's (2015) reghdfe command:
I am interested in the marginal effect at means of COVID. Firstly I ran:
and got
If in the regression I replace 1.COVID by i.COVID in the interaction terms, predictive margins are not estimable for both values of COVID.
Finally, the most interesting:
And the error message:
Please could someone let me know what I've done wrong?
First of all, here are my data:
Code:
input float(COVID yearmonth Acquirername grossKformationEuroArea exports_percent_GDP_Euroarea target_in_US) 0 661 805 500294.3 45.17 1 0 661 336 500294.3 45.17 1 0 661 413 500294.3 45.17 1 0 662 465 500294.3 45.17 1 0 662 35 500294.3 45.17 0 0 662 374 500294.3 45.17 1 0 662 830 500294.3 45.17 1 0 662 576 500294.3 45.17 1 0 662 690 500294.3 45.17 1 0 662 575 500294.3 45.17 1 0 662 444 500294.3 45.17 1 0 662 488 500294.3 45.17 1 0 662 66 500294.3 45.17 1 0 662 355 500294.3 45.17 1 0 662 391 500294.3 45.17 1 0 662 405 500294.3 45.17 1 0 663 827 539951.94 45.17 1 0 663 350 539951.94 45.17 1 0 663 329 539951.94 45.17 1 0 663 410 539951.94 45.17 0 0 663 336 539951.94 45.17 0 0 663 777 539951.94 45.17 1 0 663 45 539951.94 45.17 1 0 663 479 539951.94 45.17 1 0 663 619 539951.94 45.17 0 0 663 725 539951.94 45.17 1 0 663 488 539951.94 45.17 1 0 663 170 539951.94 45.17 1 0 664 426 539951.94 45.17 0 0 664 665 539951.94 45.17 0 0 664 619 539951.94 45.17 1 0 664 700 539951.94 45.17 0 0 664 488 539951.94 45.17 1 0 664 171 539951.94 45.17 0
Code:
xtset AcquirorName yearmonth
Code:
reghdfe mean_ValueofTransactionmil grossKformationEuroArea exports_percent_GDP_Euroarea target_in_US COVID mean_MainRefOperatRate_monthly BroadREEREuroArea mean_SP500Returns_monthly CPAllItemsEuroArea ECBAssetsMoMchangeavg GDPEuroareaIndexMonthly euro_area_corporate_tax_rate c.grossKformationEuroArea#1.COVID c.BroadREEREuroArea#1.COVID c.mean_SP500Returns_monthly#1.COVID c.CPAllItemsEuroArea#1.COVID c.ECBAssetsMoMchangeavg#1.COVID c.GDPEuroareaIndexMonthly#1.COVID, absorb(Acquirername quarter) cluster(Acquirername)
Code:
margins COVID
Code:
Predictive margins Number of obs = 687 Model VCE: Robust Expression: Linear prediction, predict() ------------------------------------------------------------------------------ | Delta-method | Margin std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- COVID | 0 | . (not estimable) 1 | 944.9654 205.082 4.61 0.000 543.0121 1346.919 ------------------------------------------------------------------------------
Finally, the most interesting:
Code:
margins, dydx(COVID) atmeans
Code:
invalid dydx() option; variable COVID may not be present in model as factor and continuous predictor
Comment