Using mfx to create marginal effects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using mfx to create marginal effects

T.Riedle
Dear all,



I am trying to estimate the marginal effects of a logit regression using the mfx package. It is crucial that the standard errors are clustered at the year level. Hence, the code looks as follows:

marginal.t24.2<-logitmfx(stock.market.crash~crash.t24+bubble.t24+RV.t24,data=Data_logitregression_lags, clustervar1 = "year")

marginal.t24.4<-logitmfx(stock.market.crash~crash.t24+bubble.t24+MP.t24+UTS.t24+UPR.t24+PPI.t24+RV.t24,data=Data_logitregression_lags, clustervar1 = "year")





Is it correct to use clustervar1 = "year" to have year clustered standard errors?

In addition I would like to create a table. I thought that stargazer would be appropriate but the following code is not working:

stargazer(marginal.t24.2, marginal.t24.4, title="Marginal effects result",type="text",out="Marginalt24logit-exportJun2017.txt")



R returns following error:

% Error: Unrecognized object type.



How can I create a table with marginal effects and the corresponding standard errors? Is there an alternative to stargazer?



Thanks for your support in advance.



Kind regards.



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.