Skip to content

Commit efb80de

Browse files
committed
Fixed crash on testing of multiple independent hypotheses on ML models
1 parent 8d598e6 commit efb80de

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

boottest.ado

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*! boottest 2.1.2 18 June 2018
1+
*! boottest 2.1.3 28 June 2018
22
*! Copyright (C) 2015-18 David Roodman
33

44
* This program is free software: you can redistribute it and/or modify
@@ -463,6 +463,11 @@ program define _boottest, rclass sortpreserve
463463
mata _boottestC = st_matrixcolstripe("`CC0'")[,2]
464464
mata _boottestC = !(strmatch(_boottestC, "*b*.*") :| strmatch(_boottestC, "*o*.*"))'; _boottestC[cols(_boottestC)] = 0 // don't look at r column
465465
mata st_matrix("`CC0'", select(st_matrix("`CC0'"), rowsum(select(st_matrix("`CC0'"), _boottestC) :!= 0)))
466+
cap mat `CC0'[1,1] = `CC0'[1,1]
467+
if _rc {
468+
di as error _n "Null constraint applies only to omitted variables or base levels of factor variables."
469+
continue
470+
}
466471

467472
`quietly' di as res _n "Re-running regression with null imposed." _n
468473
if `"`cmdline'"'=="" local 0 `e(cmdline)'
@@ -534,6 +539,7 @@ program define _boottest, rclass sortpreserve
534539
tokenize `:coleq `b''
535540
local lasteq
536541
local eq 0
542+
local _sc
537543
qui forvalues i=1/`k' {
538544
if "``i''" != "`lasteq'" | "``i''"=="/" {
539545
local ++eq
@@ -698,7 +704,8 @@ program define _boottest, rclass sortpreserve
698704
end
699705

700706
* Version history
701-
* 2.1.3 Added more return values and Roodman et al. cite to help file. Blocked warning about \alpha(B+1) being an integer for Rademacher with <=12 groups.
707+
* 2.1.3 Fixed crash on testing of multiple independent hypotheses on ML models
708+
* Added more return values and Roodman et al. cite to help file. Blocked warning about \alpha(B+1) being an integer for Rademacher with <=12 groups.
702709
* 2.1.2 Fixed error in removing half-counting of ties in 2.0.6
703710
* Stopped crashes after mlogit (and probably other mlogit and mprobit commands)
704711
* 2.1.1 Fixed failure to detect FE variable after xtreg, fe cluster()

0 commit comments

Comments
 (0)