Skip to content

Commit b26eeaa

Browse files
igerberclaude
andcommitted
Preserve df=0 sentinel on DoseResponseCurve for NaN serialization
Pass _survey_df directly (including the 0 sentinel) to DoseResponseCurve so that to_dataframe() also produces NaN inference for rank-deficient replicate designs. Previously converted 0→None which caused to_dataframe() to fall back to z-distribution with finite t_stat/p_value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d0aefae commit b26eeaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

diff_diff/continuous_did.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def fit(
684684
target="att",
685685
p_value=att_d_p,
686686
n_bootstrap=self.n_bootstrap,
687-
df_survey=_survey_df if _survey_df != 0 else None,
687+
df_survey=_survey_df,
688688
)
689689
dose_response_acrt = DoseResponseCurve(
690690
dose_grid=dvals,
@@ -695,7 +695,7 @@ def fit(
695695
target="acrt",
696696
p_value=acrt_d_p,
697697
n_bootstrap=self.n_bootstrap,
698-
df_survey=_survey_df if _survey_df != 0 else None,
698+
df_survey=_survey_df,
699699
)
700700

701701
# Strip bootstrap internals from gt_results

0 commit comments

Comments
 (0)