Skip to content

Commit 2f99b3f

Browse files
committed
Fixed failure to detect # of FE after areg in Stata version < 15
1 parent d14222a commit 2f99b3f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

boottest.ado

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*! boottest 2.2.0 12 August 2018
1+
*! boottest 2.2.1 21 August 2018
22
*! Copyright (C) 2015-18 David Roodman
33

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

231231
local FEname = cond(inlist("`cmd'","xtreg","xtivreg","xtivreg2"), "`e(ivar)'", "`e(absvar)'`e(absvars)'")
232-
local NFE = cond(inlist("`cmd'","xtreg","xtivreg","xtivreg2"), e(N_g) , 0`e(k_absorb)'`e(K1)')
233-
232+
local NFE = cond(inlist("`cmd'","xtreg","xtivreg","xtivreg2"), e(N_g) , cond("`cmd'"=="areg", 1+e(df_a), 0`e(K1)'))
233+
234234
if `"`seed'"'!="" set seed `seed'
235235

236236
tempname p padj se stat df df_r hold C C0 CC0 b V keepC keepW repsname repsFeasname
@@ -731,6 +731,7 @@ program define _boottest, rclass sortpreserve
731731
end
732732

733733
* Version history
734+
* 2.2.1 Fixed failure to detect # of FE after areg in Stata version < 15
734735
* 2.2.0 Added contour plotting for 2-D tests.
735736
* 2.1.9 Work-around for Stata crash when number of fixed effects is very large: require # of FE as input, and don't represent them as linked list.
736737
* 2.1.8 Fixed 2.1.6 crash with FE. Fixed parsing of matsizegb() option.

0 commit comments

Comments
 (0)