Skip to content

Commit 8149acf

Browse files
committed
after-reghdfe fix: look for FE count in e(df_a) as well as e(K1)
1 parent 2ce07ae commit 8149acf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

boottest.ado

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*! boottest 2.3.9 4 May 2019
1+
*! boottest 2.4.0 28 May 2019
22
*! Copyright (C) 2015-19 David Roodman
33

44
* This program is free software: you can redistribute it and/or modify
@@ -232,7 +232,7 @@ program define _boottest, rclass sortpreserve
232232
local scoreBS = "`boottype'"=="score"
233233

234234
local FEname = cond(inlist("`cmd'","xtreg","xtivreg","xtivreg2"), "`e(ivar)'", "`e(absvar)'`e(absvars)'")
235-
local NFE = cond(inlist("`cmd'","xtreg","xtivreg","xtivreg2"), e(N_g) , cond("`cmd'"=="areg", 1+e(df_a), 0`e(K1)'))
235+
local NFE = cond(inlist("`cmd'","xtreg","xtivreg","xtivreg2"), e(N_g) , cond("`cmd'"=="areg", 1+e(df_a), max(0`e(K1)',0`e(df_a)')))
236236

237237
if `"`seed'"'!="" set seed `seed'
238238

@@ -743,6 +743,7 @@ program define _boottest, rclass sortpreserve
743743
end
744744

745745
* Version history
746+
* 2.4.0 After reghdfe look for FE count in e(df_a) as well as e(K1)
746747
* 2.3.9 Prevented crash in pure "robust" non-WRE
747748
* 2.3.8 Prevented crash when it can't recompile boottest.mata; instead issues an explanatory warning
748749
* 2.3.7 Fixed crash after tobit estimation in Stata 15

0 commit comments

Comments
 (0)