* read your data into Stata use https://stats.idre.ucla.edu/stat/stata/notes/hsb2, clear generate goodread = (read > 60) * run logistic predicting "goodread" from "write" logit goodread female * run permutation test for above with 10000 repetitions permute female "logit goodread female" e(chi2), reps(10000)