diff --git a/src/reghdfe.ado b/src/reghdfe.ado index 6b8e4e0..32aa961 100644 --- a/src/reghdfe.ado +++ b/src/reghdfe.ado @@ -1,4 +1,4 @@ -*! version 4.4.5 15sep2017 +*! version 4.4.6 18sep2017 program reghdfe, eclass * Intercept old+version diff --git a/src/reghdfe_constructor.mata b/src/reghdfe_constructor.mata index 22713df..23a0224 100644 --- a/src/reghdfe_constructor.mata +++ b/src/reghdfe_constructor.mata @@ -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) { diff --git a/src/reghdfe_projections.mata b/src/reghdfe_projections.mata index 1b78803..e7eae71 100644 --- a/src/reghdfe_projections.mata +++ b/src/reghdfe_projections.mata @@ -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") diff --git a/test/testall.do b/test/testall.do index 1306d28..2046d7d 100644 --- a/test/testall.do +++ b/test/testall.do @@ -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