Skip to content

Commit

Permalink
reduce memory usage a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorreia committed Sep 18, 2017
1 parent 72d7869 commit 0074319
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/reghdfe.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 4.4.5 15sep2017
*! version 4.4.6 18sep2017

program reghdfe, eclass
* Intercept old+version
Expand Down
3 changes: 2 additions & 1 deletion src/reghdfe_constructor.mata
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ mata:
}
if (i<=S.G) {
S.factors[g] = factor(S.ivars[g], S.sample)
// We don't need to save keys (or sort levels but that might change estimates of FEs)
S.factors[g] = factor(S.ivars[g], S.sample, ., "", ., 1, ., 0)
}
if (S.verbose > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/reghdfe_projections.mata
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ mata:
{
pointer(`Variable') Pw, Pcounts
`Boolean' has_weights
has_weights = asarray(f.extra, "has_weights")
// assert(has_weights==0 | has_weights==1)
has_weights = asarray(f.extra, "has_weights") == J(0,0,.) ? 0 : asarray(f.extra, "has_weights")
assert(has_weights==0 | has_weights==1)
if (has_weights) {
Pw = &asarray(f.extra, "weights")
Expand Down
8 changes: 8 additions & 0 deletions test/testall.do
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
**** PREPARE

* Reload
cap ado uninstall reghdfe
loc dir `c(pwd)'
loc dir : subinstr loc dir "test" "src"
di as text "DIR: `dir'"
net install reghdfe, from("`dir'")


* Clean slate
set more off
set trace off
Expand Down

0 comments on commit 0074319

Please sign in to comment.