Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## In Progress: May 22, 2026

- Fixed a Stata `rdhte` startup error (`too few quotes`, r(132)) caused by
parsing the current `rdrobust` version stamp past later quoted comments.
- Began audit of the 0.2.0 R/Stata update and new Python package.
- Updated repository checks and numerical-baseline tooling for the new
R vignette/data layout and pyproject-based Python package.
Expand Down
16 changes: 10 additions & 6 deletions stata/rdhte.ado
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
************************************************************************************************
* RDHTE STATA PACKAGE -- rdhte
* Authors: Sebastian Calonico, Matias D. Cattaneo, Max Farrell, Filippo Palomba, Rocio Tititunik
*! version 0.2.0 22may2026
*! version 0.2.1 18jun2026
*
* 2026-05-14: M4 clarity (hash counting comments), vce-mapping consolidation
* (single canonical-name -> (display, regress, rdbw) lookup),
Expand Down Expand Up @@ -34,8 +34,8 @@ program define rdhte, eclass


* Verify rdrobust is installed (anywhere on the adopath -- not just
* sysdir_plus) and at version 11 or later. Uses findfile + a regex
* scan of the *! version stamp rather than assuming a fixed line layout.
* sysdir_plus) and at version 11 or later. Parse only the Stata version
* stamp; later comments can contain backtick quotes.
*
capture findfile rdrobust.ado
if _rc {
Expand All @@ -51,9 +51,13 @@ program define rdhte, eclass
local rd_major = .
file read `fh' line
while r(eof) == 0 & "`rdversion'" == "" {
if regexm(`"`macval(line)'"', "^\*!.*v([0-9]+)\.([0-9]+)\.([0-9]+)") {
local rdversion = regexs(0)
local rd_major = real(regexs(1))
local _rdline = strltrim(`"`macval(line)'"')
if substr(`"`_rdline'"', 1, 2) == "*!" {
if regexm(`"`_rdline'"', "^\*![^0-9]*([0-9]+)\.([0-9]+)\.([0-9]+)") {
local rdversion = regexs(0)
local rd_major = real(regexs(1))
}
continue, break
}
file read `fh' line
}
Expand Down
2 changes: 1 addition & 1 deletion stata/rdhte.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{* *!version 0.2.0 2026-05-22}{...}
{* *!version 0.2.1 2026-06-18}{...}
{viewerjumpto "Syntax" "rdhte##syntax"}{...}
{viewerjumpto "Description" "rdhte##description"}{...}
{viewerjumpto "Options" "rdhte##options"}{...}
Expand Down