Skip to content

Commit

Permalink
Fix bug in posting sample size.
Browse files Browse the repository at this point in the history
  • Loading branch information
droodman committed Dec 10, 2023
1 parent b4ea020 commit 4ef8c85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions partialhdfejl.ado
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ program define partialhdfejl

tokenize `absorb'
local absorb `*' // remove extra spaces
local feterms i.`: subinstr local absorb " " " + i.", all'
local feterms i.`: subinstr local absorb " " " i.", all'

local absorbvars `feterms'
local feterms: subinstr local feterms "##c." ")*(", all
Expand All @@ -63,7 +63,6 @@ program define partialhdfejl
local absorbvars: subinstr local absorbvars "c." " ", all
local absorbvars: subinstr local absorbvars "#" " ", all

local absorbvars `absorbvars'
foreach var in `absorbvars' {
cap confirm numeric var `var'
if _rc {
Expand Down
14 changes: 6 additions & 8 deletions reghdfejl.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! reghdfejl 0.4.3 7 December 2023
*! reghdfejl 0.4.3 9 December 2023

// The MIT License (MIT)
//
Expand Down Expand Up @@ -242,7 +242,6 @@ program define reghdfejl, eclass
local absorbvars: subinstr local absorbvars "c." " ", all
local absorbvars: subinstr local absorbvars "#" " ", all
local absorbvars `absorbvars'
foreach var in `absorbvars' {
cap confirm numeric var `var'
if _rc {
Expand Down Expand Up @@ -324,9 +323,9 @@ program define reghdfejl, eclass
jl, qui: res = nothing
}
tempname t
tempname t N
jl, qui: SF_scal_save("`t'", nobs(m))
jl, qui: SF_scal_save("`N'", nobs(m))
if `sample' {
jl, qui: esample = Vector{Float64}(m.esample)
Expand Down Expand Up @@ -358,7 +357,7 @@ program define reghdfejl, eclass
}
else local hascons = 0
ereturn post `b' `V', depname(`depname') obs(`=`t'') buildfvinfo findomitted `=cond(`sample', "esample(`touse')", "")'
ereturn post `b' `V', depname(`depname') obs(`=`N'') buildfvinfo findomitted `=cond(`sample', "esample(`touse')", "")'
ereturn scalar N_hdfe = 0`N_hdfe'
jl, qui: SF_scal_save("`t'", sizedf[1])
Expand Down Expand Up @@ -449,7 +448,6 @@ program define reghdfejl, eclass
Display, `diopts' level(`level') `noheader' `notable'
end
cap program drop Display
program define Display
version 16
syntax [, Level(real `c(level)') noHEADer notable *]
Expand Down Expand Up @@ -486,6 +484,6 @@ end
* 0.3.2 Much better handling of interactions. Switched to BLISBLAS.jl.
* 0.3.3 Fixed bugs in handling of interactions and constant term
* 0.4.0 Added mask and unmask
* 0.4.1 Properly handle varlists with -/?/*/~
* 0.4.1 Handle varlists with -/?/*/~
* 0.4.2 Set version minima for some packages
* 0.4.3 Add julia.ado version check
* 0.4.3 Add julia.ado version check. Fix bug in posting sample size.

0 comments on commit 4ef8c85

Please sign in to comment.