Lightweight Tkinter app for running a regression discontinuity tree (RDT) analysis on an Excel sheet. Pick a running variable and outcome column, then the app fits a decision tree, finds an optimal cutoff, runs basic stats, and plots the results.
- Python 3.x with GUI support (Tkinter)
- Packages:
pandas,numpy,matplotlib,scikit-learn,scipy
Install deps:
pip install pandas numpy matplotlib scikit-learn scipy- Place your data in an
.xls/.xlsxfile with at least a running variable, an outcome variable, and an optionalGrpTraincolumn for coloring points. - Run the app:
python RDD_Test_V6.py- In the window, choose the Excel file, select the X (running) and Y (outcome) columns, then click Run RDT Analysis. Choose the cutoff method (auto or manual) when prompted. Enter a training group name to color the final bar plot.
- Scatter plot with regression line and tree-derived cutoff
- Visualized decision tree
- Cross-validated MSE and bootstrap CI for the fitted tree
- Mann–Whitney, t-test, permutation test, and a bar plot comparing means across the cutoff