Skip to Main Content

Stata Programs for Teaching


Useful Stata Programs

This page describes Stata programs for
teaching.  You can download any of these programs from within Stata using
the search command.  For example, to download the cidemo command you can type search
cidemo
(see
How can I use the search command to search for programs and get additional
help?
for more information about using search).

Teaching Tools about
Univariate Distributions
cidemo

How N and confidence level
affects the size of confidence intervals
cidemo2 How N and confidence level affects the size of
confidence intervals, enhanced
clt Central limit theorem demonstration
meanpt Graph distribution with moving point
sdmdemo Shows influence of N on
sampling distribution of the mean

Probability Simulation Teaching Tools
bxmodel Box Model Simulation
cards Card playing simulation, including blackjack
dice Dice rolling simulation
heads Coin tossing simulation

Teaching Tools about Statistical Distributions
chidemo Shows Chi-square distribution
with rejection region
fdemo Shows F distribution with rejection region
probtabl Probability tables
tdemo Shows Students t distribution with rejection region
zdemo Display Z distribution with vertical
lines
zdemo2 Display two normal distributions with differing means & sd
ztail Shows Z distribution with a
given percentage in the tails

Regression Teaching Tools
corrsq    Matrix of squared correlation coefficients
cordemo    Shows scatterplot for correlation
grols Graphs OLS regression line
grlog Graph logistic regression curve
orcalc Calculates odds ratios
regpt The influence of a single point in regression
vibl Visualizing Main
Effects and Interactions for Binary Logit Models in Stata
Other/Misc Teaching Tools
pwrdemo Demonstration showing Ho &
Ha curves for teaching power
pwrdemo2  How power varies with n, alpha,
and effect size, animated
pwrdemo3  How power varies with n, alpha and effect size
t2demo T2 demonstration
zcalc Computing Z Scores