This repository contains Python implementations of tables and figures from the reference textbook !Robust Statistics Theory and Methods!. The goal is to provide reproducible, executable code for visualizations and results presented in the book.
Implementation is shared for learning purposes only.
The repository is organized by chapter:
- chapter_1.py
- chapter_2.py
- chapter_3.py
- ...
Each file corresponds to a chapter and contains functions that generate specific tables or figures.
- Functions are named according to the book’s structure:
figure_<chapter>_<number>()table_<chapter>_<number>()
Example:
def figure_3_1():
...
def figure_3_2():
...Each chapter file is executable as a standalone script. To run a specific figure or table, you need to manually select the function inside the file.
Example:
if __name__ == '__main__':
figure_3_1()Run from the command line:
python chapter_3.py
You can modify the main block to call any function you want to generate.
import numpy as np
from scipy.stats import norm
import matplotlib.pyplot as plt
from rstm import madn, mdn, iqr
from rstm.estimators import Huber, Bisquare, TrimmedMean, Category
def figure_3_1():
# implementation here
...
if __name__ == '__main__':
figure_3_1()Reach out to mmmarouen