index of NJC's best Stata stuff (version 12 June 2024)

Description

This is a list of what I regard as my best Stata packages or commands
that are in the public domain. If a help file is not accessible to you, use
search to find out where the files are. The help files carry details on
people who kindly reported bugs or made useful suggestions. A fuller list is
available at NJC stuff.

Contributor to official Stata commands

command version added

dataex 14.2, 15.1 update
clonevar 8 update
tostring 8 update
ci 8 update (advisor)
cumul 8 update
ds 8 update
levels 8 update (levelsof in 9 up)
duplicates 8
split 8
ssc 7 update
findit 7 update
destring 7
egen 7
contract 6
separate 6
serrbar 6
spikeplot 6

Packages, mostly on SSC

General graphics commands

aaplot scatter plot with linear and/or quadratic fit, automatically annotated
binsm bin smoothing and summary on scatter plots
catplot plots of categorical data
ciplot plots of confidence intervals
combineplot combine similar plots for different variables
corrtable correlation matrix as graphical table
crossplot scatter (twoway) plots for each y vs each x
cycleplot cycle plots (seasonal subseries plots)
depthplot plot variable(s) with depth as vertical axis
designplot graphical summary of response given one or more factors
diagsm diagonal smoothing
distplot distribution function plots
domdiag dominance diagrams
doublesm double smoothing
dpplot density probability plots
eofplot plot coefficients or loadings after PCA or factor analysis
eqprhistogram equal probability histograms
fabplot plots for each subset, rest of data as backdrop
favplots formatted added-variable plot(s)
floatplot floating or sliding stacked bar plot
fractileplot smoothing with distribution function predictors
jaccard Jaccard similarity or dissimilarity of sets
kaplansky graph examples of distributions of varying kurtosis
linkplot linked scatter plots
localp kernel-weighted local polynomial smoothing
missingplot plot showing patterns of missing values in a dataset
mlowess lowess smoothing with multiple predictors
modeldiag model diagnostics after regression-type commands
multidot multiple panel dot charts and similar
multiline multiple panel line plots
multqplot multiple quantile plots
mycolours set a palette of colours through local macros
mylabels axis labels or ticks on specified scales
nicelabels nice axis labels for general scales
niceloglabels nice axis labels for logarithmic scales
pairplot plots of paired observations
parplot parallel coordinates plots
pdplot Pareto dot plots
polarsm polar smoothing
ppplot P-P plots
qplot quantile plots
qqplotg quantile-quantile plots, generalized
rcspline restricted cubic spline smoothing
sdline SD line (reduced major axis)
sepscatter scatter plots separated by a third variable
skewplot skewness plots
sliceplot time series or other plot in slices
sparkline sparkline-type plots
spineplot spine plots for two-way categorical data
statplot plots of summary statistics
stemplot stem-and-leaf plots
stripplot strip plots
tabplot one-, two- and three-way bar charts for tables
transplot plots for trying out transformations
triplot triangular plots
trimplot plots of trimmed means
twoway__whistogram_gen
histogram subroutine supporting aweights and iweights
upsetplot Euler or Venn diagrams mapped to bar charts, upsetplot style
vennbar Euler or Venn diagrams mapped to bar or dot charts
zmap binned scatter maps

Distribution fitting and plotting

qenv generate quantile envelopes for quantile-quantile plots (qenvnormal, qenvgamma, etc.)
betafit beta distribution
pbeta
qbeta
dirifit Dirichlet distribution
pexp exponential distribution
qexp
gammafit gamma distribution
pgamma
qgamma
gumbelfit Gumbel distribution
pgumbel
qgumbel
invgammafit inverse gamma distribution
pinvgamma
qinvgamma
invgaussfit inverse Gaussian distribution
pinvgauss
qinvgauss
weibullfit Weibull distribution
pweibull
qweibull
qpfit Dagum, generalized beta (second kind),
lognormal, Singh-Maddala distributions

Other statistics

bkrosenblatt Blum, Kiefer and Rosenblatt test of bivariate independence
circular circular statistics
concord concordance correlation
corrci, corrcii correlation with z-based confidence intervals
cpcorr correlations for each row vs each column variable
diptest dip statistic to test for unimodality
entropyetc entropy and related measures for categories
extremes list extreme values
find_denom minimum sample size from percentages
firstdigit first digits of numeric variables
glmcorr correlation and RMS error for GLMs
group1d grouping or clustering in one dimension
hdquantile Harrell-Davis estimator of quantiles
hsmode half-sample modes
iquantile interpolated quantiles
lmoments L-moments and derived statistics
lvalues letter value calculation
modes tabulation of modes
moments moment-based statistics
multidensity kernel density estimation for one or more variables or groups
nruns number of runs compared with random shuffles
omninorm omnibus test for univariate or multivariate normality
pcacoefsave save results of PCA to new dataset
qsbayes, qsbayesi quasi-Bayes smoothing of categorical frequencies
rangerun run commands on observations within range
rangestat generate statistics using observations within range
shorth descriptive statistics based on shortest halves
tab_chi chitest, chitesti, tabm, tabsplit especially
transint transformations help
trimmean trimmed means as descriptive statistics

Data management and programming

charlist list characters present in string variables
countvalues list counts of integer values across variables
dataex generate formatted data example for Statalist
distinct display number of distinct values of variables
egenmore extension to generate (more extras)
fedit find and edit text file from within Stata
findname list variables matching name patterns or other properties
fixsort sort variables and align in sorted order
fs show names of files in compact form
groups list group frequencies
labmask values or value labels of one variable as value labels of another
listfirst list so many observations
longshape reshape to long (limited alternative)
mipolate interpolate missing values
missings utilities for managing missing values
moss multiple occurrences of substrings
multencode encode multiple string variables into numeric
myaxis reorder categorical variable by specified sort criterion
myweeks numbered weeks from daily dates
numdate generate numeric date-time variable
panelthin observations for thinned panel dataset
rowranks row ranks of a set of variables
rowsort row sort a set of variables
seqvar assign integer numlists to variables
tabcount tabulate frequencies
tsegen invoke egen using tsvarlist as argument
tsspell identification of spells in time series
tuples selecting all possible tuples from a list
xtpatternvar generate variable describing panel patterns

Collaborators

C.F. Baum,
M. Blasnik,
E.A. Booth,
A. Brady,
J. Brogger,
M.L. Buis,
R. Ferrer,
R. Goldstein,
W. Gould,
J.P. Gray,
R.G. Gutierrez,
S.P. Jenkins,
S. Juul,
P. van Kerm,
D. Klein,
U. Kohler,
G. Longton,
J.N. Luchman,
S. Merryman,
T. Morris,
R. Picard,
B. Rising,
G. Rossman,
P. Royston,
I.H. Salgado-Ugarte,
P. Sasieni,
M. Shimizu,
N. Smeeton,
T.J. Steichen,
S. Stillman,
T. Taniuchi,
A. Tobias,
Z. Wang,
J. Weesie,
J.B. Wernow,
V. Wiggins,
D.E. Williams,
N. Winter,
F. Wolfe

Author

Nicholas J. Cox, Durham University

n.j.cox@durham.ac.uk