Skip to content

Commit

Permalink
Fix #276
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorreia committed Sep 12, 2023
1 parent 14f6ab0 commit e73880c
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

## Recent Updates

* **version 6.12.4 12sep2023**:
- Fix `ivreghdfe` bug when clustering with string variables (#276)
* **version 6.12.3 20aug2023**:
- Bugfix for parallel option (macOS)
- Fix typos in help file
Expand Down
4 changes: 2 additions & 2 deletions current-code/reghdfe.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 6.12.3 08aug2023
*! version 6.12.4 12sep2023
program define reghdfe

* Intercept storing alphas
Expand Down Expand Up @@ -260,7 +260,7 @@ program Estimate, eclass
* We will just create and fill the HDFE object
loc touse `varlist'
loc varlist
markout `touse' `base_clustervars' `group_id' `individual_id'
markout `touse' `base_clustervars' `group_id' `individual_id', strok
}
else {
* Set sample based on if + in + weight + group + individual + cluster variables + regression varlist (i.e. excluding absvars)
Expand Down
2 changes: 1 addition & 1 deletion current-code/reghdfe.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ d
d Required packages:
d ftools
d
d Distribution-Date: 20230820
d Distribution-Date: 20230912
d

f reghdfe.ado
Expand Down
2 changes: 1 addition & 1 deletion current-code/reghdfe.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* *! version 6.12.3 08aug2023}{...}
{* *! version 6.12.4 12sep2023}{...}
{vieweralsosee "[R] areg" "help areg"}{...}
{vieweralsosee "[R] xtreg" "help xtreg"}{...}
{vieweralsosee "" "--"}{...}
Expand Down
4 changes: 2 additions & 2 deletions src/reghdfe.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 6.12.3 08aug2023
*! version 6.12.4 12sep2023
program define reghdfe

* Intercept storing alphas
Expand Down Expand Up @@ -260,7 +260,7 @@ program Estimate, eclass
* We will just create and fill the HDFE object
loc touse `varlist'
loc varlist
markout `touse' `base_clustervars' `group_id' `individual_id'
markout `touse' `base_clustervars' `group_id' `individual_id', strok
}
else {
* Set sample based on if + in + weight + group + individual + cluster variables + regression varlist (i.e. excluding absvars)
Expand Down
2 changes: 1 addition & 1 deletion src/reghdfe.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ d
d Required packages:
d ftools
d
d Distribution-Date: 20230820
d Distribution-Date: 20230912
d

f reghdfe.ado
Expand Down
2 changes: 1 addition & 1 deletion src/reghdfe.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* *! version 6.12.3 08aug2023}{...}
{* *! version 6.12.4 12sep2023}{...}
{vieweralsosee "[R] areg" "help areg"}{...}
{vieweralsosee "[R] xtreg" "help xtreg"}{...}
{vieweralsosee "" "--"}{...}
Expand Down
39 changes: 39 additions & 0 deletions test/test-dependencies.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* ===========================================================================
* Test that all upstream/downstream reghdfe dependencies work
* ===========================================================================
* Note: this changes PLUS so best to restart Stata afterwards

clear all


// --------------------------------------------------------------------------
// Test SSC
// --------------------------------------------------------------------------

tempfile adopath
loc adopath "C:\Git\asd\fakeado"
di as text `"tempfile=`adopath'"'
*mkdir "`adopath'", public

sysdir set PLUS "`adopath'"

net install require, from("C:\Git\stata-require\src") // SSC version is still 1.1.1
require moremata , install
require require >= 1.3 , install
require ftools >= 2.49.1 , install
require reghdfe >= 6.12.3 , install
require ppmlhdfe >= 2.3.0 , install
*require ivreghdfe >= 1.1.3 , install // problem: SSC still has ivreghdfe 1.0.0

sysuse auto
fcollapse (sum) price, by(turn)

sysuse auto, clear
reghdfe price weight length, a(turn)
*ivreghdfe price (weight=length), a(turn)

set trace on
set tracedepth 1
ppmlhdfe turn weight length, a(trunk)

exit

0 comments on commit e73880c

Please sign in to comment.