Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boottest after xtreg and reghdfe #4

Closed
diliasov opened this issue Aug 16, 2022 · 2 comments
Closed

Boottest after xtreg and reghdfe #4

diliasov opened this issue Aug 16, 2022 · 2 comments

Comments

@diliasov
Copy link

diliasov commented Aug 16, 2022

Hello David,
Thank you very much for giving the wild-bootstrap test for Stata.
Running boottest after xtreg or reghdfe (one fixed-effect) I receive the error:

        boottest_stata():  3001  expected 54 arguments but received 58
                 <istmt>:     -  function returned error

It happened after updating boottest. I have tried to uninstall and re-install again, but it hasn't solved the issue.
I found your response on the statalist https://www.statalist.org/forums/forum/general-stata-discussion/general/1329657-boottest-error and did what you suggested, but the issue remained.
I am using Stata17 MP. Could you please help me with this issue?

. which boottest
C:\Users\tew559\ado\plus\b\boottest.ado
*! boottest 4.1.0 13 July 2022
*! Copyright (C) 2015-22 David Roodman
*! Version history at bottom
.  whichpkg boottest
All instances on search path of components of package boottest.pkg:

C:\Users\tew559\ado\plus\b\boottest.ado
*! boottest 4.1.0 13 July 2022
*! Copyright (C) 2015-22 David Roodman
*! Version history at bottom

C:\Users\tew559\ado\plus\b\boottest.mata
*! boottest 4.0.3 3 April 2022
*! Copyright (C) 2015-22 David Roodman

C:\Users\tew559\ado\plus\b\boottest.sthlp
{* *! boottest 4.1.0 19 July 2022}{...}

C:\Users\tew559\ado\plus\a\artest.ado
*! artest 4.0.0 18 March 2022
*! Copyright (C) 2015-22 David Roodman

C:\Users\tew559\ado\plus\s\scoretest.ado
*! scoretest 4.0.0 18 March 2022
*! Copyright (C) 2015-22 David Roodman

C:\Users\tew559\ado\plus\w\waldtest.ado
*! waldtest 4.0.0 18 March 2022
*! Copyright (C) 2015-22 David Roodman

C:\Users\tew559\ado\plus\l\lboottest.mlib

Best regards,
Denys

@ArthurHowardMorris
Copy link

ArthurHowardMorris commented Dec 12, 2022

Denys,

Your problem is not related to the statalist discussion that you are linking to.

The issue is that boottest requires options that reghdfe does not provide. The following code replicates the error you are reporting:

webuse nlsw88
reghdfe wage ttl_exp collgrad tenure if occupation<., cluster(age) absorb(industry)
boottest tenure, cluster(age occupation) bootcluster(occupation) seed(999) nograph 

The error points out that the problem is incompatibility with reghdfe and not a bug in boottest:

option constraints not allowed
Error imposing null. Perhaps reghdfe does not accept the constraints(), from(), and iterate() options, as needed.
r(198);

Inspecting the trace of the boottest statement you can see that this error is thrown while reghdfe.Estimate is active. It seems that both programs are working as the respective authors intended (e.g. the boottest unit tests do not include reghdfe). The solution to this problem is something that would have to be implemented within the mata functions that power reghdfe, in the meantime you could replicate your results to use areg which works with boottest.

@diliasov
Copy link
Author

Arthur,

Many thanks for your response.

I completely agree that it looks like an issue caused by the reghdfe and occurred after I updated the latter. Also, I was a bit surprised to see the same error after xtreg - now it works perfectly and I think the issue didn't relate to boottest.

Thanks for the idea with areg, I'll definitely try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants