generate case= _n
gen case=_n
anova | general ANOVA, ANCOVA, or regression |
by | repeat operation for categories of a variable |
ci | confidence intervals for means |
clear | clears previous dataset out of memory |
correlate | correlation between variables |
describe | briefly describes the data (# of obs, variable names, etc.) |
diagplot | distribution diagnostic plots |
drop | eliminate variables from memory |
edit | better alternative to input for Macs |
exit | leave Stata |
generate | creates new variables (e.g. generate years = close - start) |
graph | general graphing command (this command has many options) |
help | online help |
if | lets you select a subset of observations (e.g. list if radius >= 3000) |
infile | read non-Stata-format dataset (ASCII or text file) |
input | type in raw data |
list | lists the whole dataset in memory (you can also list only certain variables) |
log | save or print Stata ouput (except graphs) |
lookup | keyword search of commands, often precursor to help |
oneway | oneway analysis of variance |
pcorr | partial correlation coefficients |
plot | text-mode (crude) scatterplots |
predict | calculated predicted values (y-hat), residuals (ordinary, standardized and studentized), leverages, Cook's distance, standard error of predicted individual y, standard error of predicted mean y, standard error of residual from regression |
regress | regression |
replace | lets you change individual values of a variable |
save | saves data and labels in a Stata-format dataset |
sebarr | standard error-bar chart |
sort | sorts observations from smallest to largest |
stem | stem and leaf display |
summarize | produces summary statistics (# obs, mean, sd, min, max) (has a detail option) |
test | conducts various hypothesis tests (refers back to most recent model fit (e.g. regress or anova ) (see help function for info and examples)) |
ttest | one and two-sample t-tests |
use | retrieve previously saved Stata dataset |
There is a glitch with Stata's ``stem" command for stem-and-leaf plots. The
``stem" function seems to permanently reorder the data so that they are sorted
according to the variable that the stem-and-leaf plot was plotted for. The best way to avoid this problem is to avoid doing any
stem-and-leaf plots (do histograms instead). However, if you really
want to do a stem-and-leaf plot you should always create a variable
containing the original observation numbers (called ``index", for
example). A command to do so is:
generate index = _n
If you do this, then you can re-sort the data after the
stem-and-leaf plot according to the index variable (Stata command:
sort index ) so that the data is back in the original order.