Skip to content

Commit 0049064

Browse files
committed
Added support for ivreghdfe
1 parent f2d76f1 commit 0049064

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

boottest.ado

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
*! boottest 2.5.3 16 September 2019
2-
*! Copyright (C) 2015-19 David Roodman
1+
*! boottest 2.5.4 14 January 2020
2+
*! Copyright (C) 2015-20 David Roodman
33

44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ program define _boottest, rclass sortpreserve
5252
}
5353

5454
local cmd = cond(substr("`e(cmd)'", 1, 6)=="ivreg2", "ivreg2", "`e(cmd)'")
55-
local ivcmd = cond("`cmd'"=="reghdfe", "`e(subcmd)'", cond("`cmd'"=="xtivreg2", "ivreg2", "`cmd'"))
55+
local ivcmd = cond(inlist("`cmd'","reghdfe","ivreghdfe"), cond("`e(model)'=="iv", "ivreg2", ""), cond("`cmd'"=="xtivreg2", "ivreg2", "`cmd'"))
5656
5757
if "`e(cmd)'" == "" {
5858
di as err "No estimates detected."
@@ -74,8 +74,8 @@ program define _boottest, rclass sortpreserve
7474
di as err "Doesn't work after {`cmd', `e(xtmodel)'}."
7575
exit 198
7676
}
77-
if "`cmd'"=="reghdfe" & `:word count `e(absvars)''>1 {
78-
di as err "Doesn't work after {cmd:reghdfe) with more than one set of fixed effects."
77+
if inlist("`cmd'","reghdfe","ivreghdfe") & `:word count `e(absvars)''>1 {
78+
di as err "Doesn't work after {cmd:`cmd'} with more than one set of absorbed fixed effects."
7979
exit 198
8080
}
8181
if inlist("`cmd'", "sem", "gsem") & c(stata_version) < 14 {
@@ -214,7 +214,7 @@ program define _boottest, rclass sortpreserve
214214
215215
local ML = e(converged) != .
216216
local IV = "`e(instd)'`e(endogvars)'" != ""
217-
local LIML = ("`cmd'"=="ivreg2" & "`e(model)'"=="liml") | ("`cmd'"=="ivregress" & "`e(estimator)'"=="liml")| ("`cmd'"=="reghdfe" & strpos("`e(title)'", "LIML"))
217+
local LIML = ("`cmd'"=="ivreg2" & "`e(model)'"=="liml") | ("`cmd'"=="ivregress" & "`e(estimator)'"=="liml")| (inlist("`cmd'","reghdfe","ivreghdfe") & strpos("`e(title)'", "LIML"))
218218
local WRE = `"`boottype'"'!="score" & `IV' & `reps'
219219
local small = e(df_r) != . | "`small'" != "" | e(cmd)=="cgmreg"
220220
@@ -784,6 +784,7 @@ program define _boottest, rclass sortpreserve
784784
end
785785
786786
* Version history
787+
* 2.5.4 Added support for ivreghdfe
787788
* 2.5.3 Fixed crash in score test (including waldtest) after "robust" estimation without observation weights
788789
* 2.5.2 More graceful handling of degenerate cases: multiway t stat = .; test hypothesis refers to dropped/constrained variable
789790
* 2.5.1 Fixed 2.5.0 bug after "robust" estimation

0 commit comments

Comments
 (0)