Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRequest: Estimate Probit models and ability to change default standard errors. #28
Comments
|
Sorry I realized that the one can estimate a probit model. But the other comment stands. |
|
Hello and thanks for using! :-) Yes it's possible to estimate probit with On your other comment, it's actually something that I planned to do but never have done because I didn't know if people would use it in the end. Thanks to you, I now have implemented it. The code below should work with the dev version of the package. data(base_did)
est_no_FE = feols(y ~ x1, base_did)
est_one_FE = feols(y ~ x1 | id, base_did)
est_two_FE = feols(y ~ x1 | id + period, base_did)
etable(est_no_FE, est_one_FE, est_two_FE)
#> est_no_FE est_one_FE est_two_FE
#> (Intercept) 1.989*** (0.1492)
#> x1 0.9831*** (0.05012) 0.9615*** (0.04808) 0.9779*** (0.04579)
#> Fixed-Effects: ------------------- ------------------- -------------------
#> id No Yes Yes
#> period No No Yes
#> ___________________ ___________________ ___________________ ___________________
#> Observations 1,080 1,080 1,080
#> S.E. type Standard 1-way: id 1-way: id
#> R2 0.26304 0.38715 0.48696
#> Within R2 -- 0.26507 0.30776
# Changing the default standard-errors
setFixest_se(no_FE = "white", one_FE = "standard", two_FE = "twoway")
etable(est_no_FE, est_one_FE, est_two_FE)
#> est_no_FE est_one_FE est_two_FE
#> (Intercept) 1.989*** (0.149)
#> x1 0.9831*** (0.05102) 0.9615*** (0.05138) 0.9779*** (0.03453)
#> Fixed-Effects: ------------------- ------------------- -------------------
#> id No Yes Yes
#> period No No Yes
#> ___________________ ___________________ ___________________ ___________________
#> Observations 1,080 1,080 1,080
#> S.E. type White Standard 2-way: id & period
#> R2 0.26304 0.38715 0.48696
#> Within R2 -- 0.26507 0.30776
# Reseting the defaults
setFixest_se()Note that you need to specify the default for three different cases: without fixed-effects, with one, and with two or more fixed-effects. Thanks again! |
The fixest package is great and has improved my workflow and saved me a lot of computation time. But I was wondering if there is any way to estimate a probit binary response model? At the moment I am using the R package bife. But it would be nice to be able to do this using fixest, as I can do with logit models.
Furthermore, I was wondering if it was possible to change the default standard errors when estimating a model. For example
Gives the following output
Where the standard errors are clustered at the intervention level . However, with this is not what I necessarily want. In large datasets it also would seem to have a large effect on the computation time relative to the usual standard errors. Could you provide a way of overriding this behavior so I can calculate only the usual standard errors?