Skip to content

Commit 0613db0

Browse files
committed
update irm qmd and workflow
1 parent 4610d77 commit 0613db0

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

.github/workflows/irm_sim.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
strategy:
1818
matrix:
1919
script: [
20-
'scripts/irm/irm_ate_coverage.py',
21-
'scripts/irm/irm_atte_coverage.py',
22-
'scripts/irm/irm_cate_coverage.py',
23-
'scripts/irm/irm_gate_coverage.py',
20+
'scripts/irm/irm_ate.py',
21+
'scripts/irm/irm_atte.py',
22+
'scripts/irm/irm_cate.py',
23+
'scripts/irm/irm_gate.py',
2424
'scripts/irm/irm_ate_sensitivity.py',
2525
'scripts/irm/irm_atte_sensitivity.py',
2626
]
@@ -52,28 +52,37 @@ jobs:
5252
with:
5353
ref: ${{ env.TARGET_BRANCH }}
5454

55+
- name: Install uv
56+
uses: astral-sh/setup-uv@v5
57+
with:
58+
version: "0.7.8"
59+
5560
- name: Set up Python
5661
uses: actions/setup-python@v5
5762
with:
58-
python-version: '3.12'
63+
python-version-file: "monte-cover/pyproject.toml"
5964

60-
- name: Install dependencies
65+
- name: Install Monte-Cover
6166
run: |
62-
python -m pip install --upgrade pip
63-
pip install -r requirements.txt
67+
cd monte-cover
68+
uv venv
69+
uv sync
6470
6571
- name: Install DoubleML from correct branch
6672
run: |
67-
pip uninstall -y doubleml
68-
pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}"
73+
source monte-cover/.venv/bin/activate
74+
uv pip uninstall doubleml
75+
uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}"
6976
7077
- name: Set up Git configuration
7178
run: |
7279
git config --global user.name 'github-actions'
7380
git config --global user.email '[email protected]'
7481
7582
- name: Run scripts
76-
run: python ${{ matrix.script }}
83+
run: |
84+
source monte-cover/.venv/bin/activate
85+
uv run ${{ matrix.script }}
7786
7887
- name: Commit any existing changes
7988
run: |

doc/irm/irm.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ generate_and_show_styled_table(
135135

136136
## Sensitivity
137137

138-
The simulations are based on the the ADD-DGP with $10,000$ observations. As the DGP is nonlinear, we will only use corresponding learners. Since the DGP includes an unobserved confounder, we would expect a bias in the ATE estimates, leading to low coverage of the true parameter.
138+
The simulations are based on the the [make_confounded_irm_data](https://docs.doubleml.org/stable/api/generated/doubleml.datasets.make_confounded_irm_data.html#doubleml.datasets.make_confounded_irm_data)-DGP with $5,000$ observations. Since the DGP includes an unobserved confounder, we would expect a bias in the ATE estimates, leading to low coverage of the true parameter.
139139

140140
The confounding is set such that both sensitivity parameters are approximately $cf_y=cf_d=0.1$, such that the robustness value $RV$ should be approximately $10\%$.
141141
Further, the corresponding confidence intervals are one-sided (since the direction of the bias is unkown), such that only one side should approximate the corresponding coverage level (here only the lower coverage is relevant since the bias is positive). Remark that for the coverage level the value of $\rho$ has to be correctly specified, such that the coverage level will be generally (significantly) larger than the nominal level under the conservative choice of $|\rho|=1$.
@@ -157,7 +157,7 @@ print(metadata_df.T.to_string(header=False))
157157
#| echo: false
158158
159159
# set up data and rename columns
160-
df_ate_sens = pd.read_csv("../../results/irm/irm_ate_sensitivity.csv", index_col=None)
160+
df_ate_sens = pd.read_csv("../../results/irm/irm_ate_sensitivity_coverage.csv", index_col=None)
161161
162162
assert df_ate_sens["repetition"].nunique() == 1
163163
n_rep_ate_sens = df_ate_sens["repetition"].unique()[0]
@@ -211,7 +211,7 @@ print(metadata_df.T.to_string(header=False))
211211
#| echo: false
212212
213213
# set up data
214-
df_atte_sens = pd.read_csv("../../results/irm/irm_atte_sensitivity.csv", index_col=None)
214+
df_atte_sens = pd.read_csv("../../results/irm/irm_atte_sensitivity_coverage.csv", index_col=None)
215215
216216
assert df_atte_sens["repetition"].nunique() == 1
217217
n_rep_atte_sens = df_atte_sens["repetition"].unique()[0]

0 commit comments

Comments
 (0)