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

Description

This is a list of my Stata packages or commands that are in the public
domain. Most commonly you might want to search this file in the Viewer. 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. What I regard as my best packages and commands are
listed thematically at NJC best 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

OS means official Stata
obs means obsolete
pobs means partially obsolete
sup means superseded
psup means partially superseded
+ means good
judgements assume availability of Stata 17

aaplot
SSC (NJC)
scatter plot with linear and/or quadratic fit, automatically annotated
+

acplot
SSC (NJC)
autocorrelogram plots
obs(OS ac)

adjacent
SSC (NJC)
list adjacent values of variables

adotype
SSC (NJC)
type ado file
pobs(OS findfile)

allpossible
SSC (NJC)
fit all possible models with subsets of predictors

archutil
ip29 stb52 (C.F. Baum, NJC)
utilities for using SSC archive (1)
obs(OS ssc)

archutil
ip29_1 stb54 (NJC, C.F. Baum)
utilities for using SSC archive (2)
obs(OS ssc)

asciiplot
SSC (M. Blasnik, S. Juul, NJC)
graph ASCII character set in current graph font
pobs(OS Unicode support)

avplot2
SSC (NJC)
added variable plots
sup(favplots)

bandplot
SSC (NJC)
plot summary statistics of responses for bands of predictors
psup(designplot)

barplot
SSC (NJC)
bar plots
obs(OS graph)

barplot2
SSC (NJC)
bar plots with optional error bars
obs(OS graph)

bcoeff
SSC (Z. Wang, NJC)
save regression coefficients to new variable
pobs(OS statsby)

beamplot
SSC (NJC)
horizontal dotplots using beams

betafit
SSC (M.L. Buis, NJC, S.P. Jenkins)
fit two-parameter beta distribution
psup(OS betareg)

bincoverage
www.stata.com/users/rgutierrez (R.G. Gutierrez, NJC)
true coverage probabilities for binomial confidence intervals

binsm
gr26 stb37 (NJC)
bin smoothing and summary on scatter plots
sup(SJ 6-1)

binsm
gr26_1 sj6-1 (NJC)
bin smoothing and summary on scatter plots (2)
+

biv
ip26 stb45 (NJC)
bivariate results for each pair of variables in a list
sup(makematrix)

bkrosenblatt
SSC (NJC)
Blum, Kiefer and Rosenblatt test of bivariate independence
+

blogit2
SSC (NJC)
grouped data logit with support for in
obs(OS blogit)

bsmplot
gr22 stb35 (NJC)
binomial smoothing plots (1)
sup(SJ 4-4)

bsmplot
gr22_1 sj4-4 (NJC)
binomial smoothing plots (2)

catenate
SSC (NJC)
concatenate variables into string variable
obs(OS egen)

catplot
SSC (NJC)
plots of frequencies, fractions or percents of categorical data
+

cbarplot
SSC (NJC)
centred bar plots of absolute or relative frequencies

cfvars
SSC (NJC)
compare variable name lists in two data sets

chaos
SSC (NJC)
iterate a logistic difference equation

charlist
SSC (NJC)
list characters present in string variable
+

charutil
SSC (NJC)
utilities for working with characteristics

chplot
gr16_1 stb36 (NJC)
convex hull plots

cibplot
SSC (NJC)
bar-on-bar plots of confidence intervals

cihplot
SSC (NJC)
horizontally labelled plots showing confidence intervals
obs(ciplot)

cij
SSC (NJC)
binomial confidence intervals using Jeffreys prior
pobs(OS ci)

ciplot
SSC (NJC)
plots of confidence intervals
+

cipolate
SSC (NJC)
cubic interpolation
sup(SSC mipolate)

circstat
www.stata.com/users/njc (NJC)
circular statistics (1)
sup(SSC circular)

circstat
SSC (NJC)
circular statistics (2)
sup(SSC circular)

circular
SSC (NJC)
circular statistics (3; for Stata 8 up)
+

cistat
SSC (NJC)
confidence intervals in matrix form

civplot
SSC (NJC)
plot confidence intervals vertically
obs(ciplot)

ciw
SSC (NJC)
binomial confidence intervals using Wilson scores
obs(OS ci)

collfreq
dm59 stb44 (NJC)
collapsing datasets to frequencies
sup(OS contract)

combineplot
SSC (NJC)
combine similar univariate or bivariate plots for different variables
+

concord
sg84 stb43 (T.J. Steichen, NJC)
concordance correlation (1)
sup(SJ 10-4)

concord
sg84_1 stb45 (T.J. Steichen, NJC)
concordance correlation (2)
sup(SJ 10-4)

concord
sg84_2 stb54 (T.J. Steichen, NJC)
concordance correlation (3)
sup(SJ 10-4)

concord
sg84_3 stb58 (T.J. Steichen, NJC)
concordance correlation (4)
sup(SJ 10-4)

concord
st0015 sj2-2 (T.J. Steichen, NJC)
concordance correlation (5)
sup(SJ 10-4)

concord
SSC (T.J. Steichen, NJC)
concordance correlation (6)
sup(SJ 10-4)

concord
st0015_1 sj4-4 (T.J. Steichen, NJC)
concordance correlation (7)
sup(SJ 10-4)

concord
st0015_2 sj5-3 (T.J. Steichen, NJC)
concordance correlation (8)
sup(SJ 10-4)

concord
st0015_3 sj6-2 (T.J. Steichen, NJC)
concordance correlation (9)
sup(SJ 10-4)

concord
st0015_4 sj7-3 (T.J. Steichen, NJC)
concordance correlation (10)
sup(SJ 10-4)

concord
st0015_5 sj8-4 (T.J. Steichen, NJC)
concordance correlation (11)
sup(SJ 10-4)

concord
st0015_6 sj10-4 (T.J. Steichen, NJC)
concordance correlation (12)
+

condraw
gr16_2 stb41 (J.P. Gray, NJC)
convex hull plots

copydesc
SSC (NJC)
copy description of variable
pobs(OS clonevar)

corrci, corrcii
pr0041 sj8-3 (NJC)
correlation with z-based confidence intervals (1)
sup(SJ 20-4)

corrci, corrcii
pr0041_1 sj10-4 (NJC)
correlation with z-based confidence intervals (2)
sup(SJ 21-4)

corrci, corrcii
pr0041_2 sj17-3 (NJC)
correlation with z-based confidence intervals (3)
sup(SJ 21-3)

corrci, corrcii
pr0041_3 sj20-4 (NJC)
correlation with z-based confidence intervals (4)
sup(SJ 21-3)

corrci, corrcii
pr0041_4 sj21-3 (NJC)
correlation with z-based confidence intervals (5)
+

corrtable
SSC (NJC)
correlation matrix as graphical table
+

countmatch
SSC (NJC)
count matching values for one variable in another

countvalues
SSC (NJC)
list counts of integer values across variables
+

cp
ip27 stb45 (NJC)
results for all possible combinations of arguments
sup(cpr)/pobs(foreach, forval)

cpcorr
SSC (NJC)
correlations for each row vs each column variable
+

cpr
SSC (NJC)
results for all possible combinations of arguments
pobs(foreach, forval)

cpyxplot
www.stata.com/users/njc (NJC)
scatter plots for each y vs each x variable (1)
obs(crossplot)

cpyxplot
SSC (NJC)
scatter plots for each y vs each x variable (2)
obs(crossplot)

cquantile
SSC (NJC)
generate corresponding quantiles

crossplot
SSC (NJC)
scatter (or other twoway) plots for each y vs each x variable
+

csipolate
SSC (NJC)
cubic spline interpolation
sup(SSC mipolate)

ctabstat
SSC (NJC)
table of summary statistics

cycleplot
SSC (NJC)
cycle plots (month plots or seasonal subseries plots)
see also SJ 6-3

cycleplot, sliceplot
gr0025 sj6-3 (NJC)
cycle plot, slice plot
+

dataex
SSC (R. Picard, NJC)
generate a properly formatted data example for Statalist
+

dataex
Stata 14.2+, 15.1+ (R. Picard, NJC)
generate a properly formatted data example for Statalist
+

depthplot, wallplot
SSC (NJC)
plot one or more variables with depth as vertical axis
+

designplot
SSC (NJC)
graphical summary of response given one or more factors (1)
sup(SJ 19-3)

designplot
gr0061 sj14-4 (NJC)
graphical summary of response given one or more factors (2)
sup(SJ 19-3)

designplot
gr0061_1 sj15-2 (NJC)
graphical summary of response given one or more factors (3)
sup(SJ 19-3)

designplot
gr0061_2 sj17-3 (NJC)
graphical summary of response given one or more factors (4)
sup(SJ 19-3)

designplot
gr0061_3 sj19-3 (NJC)
graphical summary of response given one or more factors (5)
+

destring
dm45 stb37 (NJC, W. Gould)
change string variables to numeric (1)
sup(OS destring)

destring
dm45_1 stb49 (NJC)
change string variables to numeric (2)
sup(OS destring)

destring
dm45_2 stb52 (NJC)
change string variables to numeric (3)
sup(OS destring)

devnplot
SSC (NJC)
deviation plots
see now stripplot (SSC) for main idea

diagsm, doublesm, polarsm
gr0021 sj5-4 (NJC)
diagonal, double and polar smoothing
sup(SJ 10-1)

diagsm, doublesm, polarsm
gr0021_1 sj10-1 (NJC)
diagonal, double and polar smoothing
sup(SJ 15-4)

diagsm, doublesm, polarsm
gr0021_2 sj15-4 (NJC)
diagonal, double and polar smoothing
+

diplot
SSC (NJC)
double interval plot

diptest
SSC (NJC)
dip statistic to test for unimodality
+

dirifit
SSC (M.L. Buis, NJC, S.P. Jenkins)
fit Dirichlet distribution
+

disjoint
SSC (NJC)
demarcating disjoint spells

dissim (dissim_index)
SSC (NJC)
dissimilarity index
note: dissim now used by StataCorp

distinct
SSC (G. Longton, NJC)
display number of distinct values of variables
sup(SJ 23-4)

distinct
dm0042 sj8-4 (G. Longton, NJC)
display number of distinct values of variables
sup(SJ 23-4)

distinct
dm0042_1 sj12-2 (G. Longton, NJC)
display number of distinct values of variables
sup(SJ 23-4)

distinct
dm0042_2 sj15-3 (G. Longton, NJC)
display number of distinct values of variables
sup(SJ 23-4)

distinct
dm0042_3 sj20-4 (G. Longton, NJC)
display number of distinct values of variables
sup(SJ 23-4)

distinct
dm0042_4 sj23-2 (G. Longton, NJC)
display number of distinct values of variables
sup(SJ 23-4)

distinct
dm0042_5 sj23-4 (G. Longton, NJC)
display number of distinct values of variables
+

distplot
SSC (NJC)
distribution function plots (1)
sup(SJ 19-1)

distplot
gr41 stb51 (NJC)
distribution function plots (2)
sup(SJ 19-1)

distplot
gr41_1 sj3-2 (NJC)
distribution function plots (3)
sup(SJ 19-1)

distplot
gr41_2 sj3-4 (NJC)
distribution function plots (4)
sup(SJ 19-1)

distplot
gr41_3 sj5-3 (NJC)
distribution function plots (5)
sup(SJ 19-1)

distplot
gr41_4 sj10-1 (NJC)
distribution function plots (6)
sup(SJ 19-1)

distplot
gr41_5 sj19-1 (NJC)
distribution function plots (7)
+

dlist
SSC (NJC)
list with variable labels

domdiag
SSC (NJC)
dominance diagrams
+

doubmass
SSC (NJC)
double mass plots

dpplot
SSC (NJC)
density probability plots
sup(SJ 7-4)

dpplot
gr0012 sj5-2 (NJC)
density probability plots
sup(SJ 7-4)

dpplot
gr0012_1 sj7-4 (NJC)
density probability plots
+

dropmiss
dm89 stb60 (NJC)
dropping variables or observations with missing values
sup(missings)

dropmiss
dm89_1 sj8-4 (NJC)
dropping variables or observations with missing values
sup(missings)

dropmiss
dm89_2 sj15-4 (NJC)
dropping variables or observations with missing values
sup(missings)

ds2
SSC (NJC)
describe variables in memory (for Stata 6)
sup(OS ds, findname)

ds2
dm78 stb56 (NJC)
describe variables in memory (for Stata 6)
sup(OS ds, findname)

ds2
dm78_1 stb60 (NJC)
describe variables in memory (for Stata 7)
sup(OS ds, findname)

ds3
SSC (NJC)
describe variables in memory (for Stata 7)
sup(OS ds, findname)

ds5
SSC (NJC)
describe variables in memory (for Stata 5)
sup(OS ds, findname)

dummies
SSC (NJC)
families of dummy variables
obs(foreach)

dummieslab
SSC (P. van Kerm, NJC)
dummy variables using value labels

dups
SSC (T.J. Steichen, NJC)
identify and optionally remove duplicate observations (1)
sup(OS duplicates)

dups
dm53 stb41 (T.J. Steichen, NJC)
identify and optionally remove duplicate observations (2)
sup(OS duplicates)

egen extensions
dm70 stb50 (NJC)
egen extensions)
pobs(OS egen)

egen extensions
dm70_1 stb57 (NJC)
egen extensions (update)
pobs(OS egen)

egen rank
dm72 stb51 (NJC, R. Goldstein)
alternative ranking procedures
sup(OS egen)

egen rank
dm72_1 stb52 (NJC, R. Goldstein)
alternative ranking procedures (update)
sup(OS egen)

egenmore
SSC (NJC, C.F. Baum, U. Kohler, S. Stillman, N. Winter)
more egen functions
+

egenodd
www.stata.com/users/njc (NJC)
egen extensions
sup(STB 50, 57)

entropyetc
SSC (NJC)
entropy and related measures for categories
+

eofplot
SSC (NJC)
plot coefficients or loadings after principal component or factor analysis
+

eqprhistogram
SSC (NJC)
equal probability histograms
+

ewma
SSC (NJC)
exponentially weighted moving average
obs(OS tssmooth)

examples
SSC (NJC)
show examples from on-line help files

expandby
SSC (NJC)
duplicate observations by variable

extremes
SSC (NJC)
list extreme values of a variable
+

fabplot
SSC (NJC)
plots for each subset, rest of data as backdrop
sup(SJ 21-2)

fabplot
gr0087 sj21-2
plots for each subset, rest of data as backdrop
+

favplots
SSC (NJC)
formatted added-variable plot(s)
+

fbar
SSC (NJC)
bar charts showing frequencies of categorical variables
obs(OS graph, catplot)

fedit
SSC (NJC)
find and edit text file from within Stata
+

filei
SSC (NJC)
write lines to end or beginning of text files

find_denom
SSC (NJC)
minimum sample size from percentages
sup(SJ 23-4)

find_denom
st0737 sj23-4 (NJC)
minimum sample size from percentages
+

findname
SSC (NJC)
list variables matching name patterns or other properties
sup(SJ 23-4)

findname
dm0048 sj10-2 (NJC)
list variables matching name patterns or other properties
sup(SJ 23-4)

findname
dm0048_1 sj10-4 (NJC)
list variables matching name patterns or other properties
sup(SJ 23-4)

findname
dm0048_2 sj12-1 (NJC)
list variables matching name patterns or other properties
sup(SJ 23-4)

findname
dm0048_3 sj15-2 (NJC)
list variables matching name patterns or other properties
sup(SJ 23-4)

findname
dm0048_4 sj20-2 (NJC)
list variables matching name patterns or other properties
sup(SJ 23-4)

findname
dm0048_5 sj23-4 (NJC)
list variables matching name patterns or other properties
+

firstdigit
SSC (NJC)
first digits of numeric variables
+

fixsort
SSC (NJC)
sort and align variables, others fixed in position
+

floatplot
SSC (NJC)
floating or sliding stacked bar plot for frequencies, proportions, or percents
+

flower
SSC (T.J. Steichen, NJC)
sunflower plots
obs(OS graph)

fndmtch
SSC (NJC, D.E. Williams)
find matching values

fndmtch2
SSC (NJC)
find matching values for one variable in another
sup(SSC countmatch)

fractileplot
SSC (NJC)
smoothing with respect to distribution function predictors
+

fs
SSC (NJC)
show names of files in compact form
+

fsx
SSC (G. Rossman, NJC)
show names of files in compact form (Unix variant)

gammafit
SSC (NJC, S.P. Jenkins)
fit two-parameter gamma distribution
+

genfreq
SSC (NJC)
frequency distribution for a variable
obs(OS graph)

ghistcum
SSC (C.F. Baum, NJC)
histograms with cumulative distribution
obs(OS graph)

glmcorr
SSC (NJC)
correlation measure of predictive power for GLMs
+

group1d
SSC (NJC)
grouping or clustering in one dimension
+

groups
SSC (NJC)
list group frequencies (1)
+

groups
st0496 sj17-3 (NJC)
list group frequencies (2)
sup(SJ 18-1)

groups
st0496_1 sj18-1 (NJC)
list group frequencies (3)
+

gumbelfit
SSC (NJC, S.P. Jenkins)
fit two-parameter Gumbel distribution
+

hansen2
SSC (NJC)
Hansen's test for parameter instability

hbar
SSC (NJC)
horizontal bar charts
obs(OS graph)

hbox
SSC (NJC)
horizontal box plots
obs(OS graph)

hdquantile
SSC (NJC)
Harrell-Davis estimator of quantiles
+

histplot
SSC (NJC)
histograms
obs(OS graph)

hlist
SSC (NJC)
horizontally listing values

hlpdir
SSC (NJC)
find location(s) of help file
pobs(OS findfile)

hplot
SSC (NJC)
horizontal plots
obs(OS graph)

hsmode
SSC (NJC)
half-sample modes
+

ineq
SSC (NJC)
measures of inequality
pobs(SSC entropyetc)

invgammafit
SSC (NJC, S.P. Jenkins)
fit two-parameter inverse gamma distribution
+

invgaussfit
SSC (NJC, S.P. Jenkins)
fit two-parameter inverse Gaussian distribution
+

iquantile
SSC (NJC)
interpolated quantiles
+

irrepro
SSC (NJC)
simulation of irreproducible results

isvar
SSC (NJC)
filter names into variable names and others

jaccard
SSC (NJC)
Jaccard similarity or dissimilarity of sets
+

kaplansky
SSC (NJC)
graph examples of distributions of varying kurtosis
+

kernreg2
SSC (NJC, I.H. Salgado-Ugarte, M. Shimizu, T. Taniuchi)
kernel regression (Nadaraya-Watson estimator)
obs(OS lpoly)

keyplot
SSC (NJC)
scatter plots with keys in user-chosen positions
obs(OS graph)

labellacking
SSC (NJC, R. Picard)
report numeric variables with values lacking value labels

labgen
SSC (NJC)
generate or replace variables with definitions copied to variable labels

labmask
gr0034 sj8-2 (NJC)
values or value labels of one variable as value labels of another
+

labutil
SSC (NJC)
managing value and variable labels

lambda
SSC (NJC)
Goodman and Kruskal's lambda measures for two-way tables

levels
SSC (NJC)
distinct levels of integer or string variable
sup(OS levelsof)

linkplot
SSC (NJC)
linked (connected) scatter plots
+ (note also OS pcarrow, etc.)

listfirst
SSC (NJC)
list so many observations
+

listutil
SSC (NJC)
manipulate lists of words
pobs(OS foreach, forval, macrolists)

ljs
SSC (NJC)
left-justify string variables for printing
obs(OS format)

lmoments
SSC (NJC)
L-moments and derived statistics
+

localp
SSC (NJC)
kernel-weighted local polynomial smoothing
+

log2html
SSC (C.F. Baum, NJC, B. Rising)
produce HTML log files

longplot
SSC (Z. Wang, NJC)
exploratory plots for longitudinal data
pobs(linkplot, OS)

longshape
SSC (NJC)
reshape to long (limited alternative)
+

loopplot
SSC (NJC)
scatter plots with loops

lstack
SSC (NJC)
stack variables with labelled _stack

lvalues
SSC (NJC)
letter value calculation
sup(SJ 16-4)

lvalues
st0465 sj16-4 (NJC)
letter value calculation
+

majority
SSC (NJC)
majority calculations for real or hypothetical elections

makematrix
SSC (NJC)
make a matrix of results from other commands

marker
SSC (NJC)
generate indicator variable marking desired sample

markov
SSC (NJC)
generate Markov probabilities
pobs(OS xttrans, xttrans2)

matmap
SSC (NJC)
elementwise calculations for matrices
pobs(OS Mata)

matmore
dm79 stb56 (NJC)
yet more new matrix commands
pobs(OS Mata)

matodd
www.stata.com/users/njc (NJC)
various matrix tasks
pobs(OS Mata)

matodd
dm69 stb50 (NJC)
various matrix tasks
pobs(OS Mata)

matodd
SSC (NJC)
various matrix tasks
psup(STB 50); pobs(OS Mata)

matrixof
SSC (NJC)
matrix or vector of results for paired or single variables
sup(makematrix)

matvsort
SSC (NJC)
sorting vectors or rows or columns of matrices
pobs(OS Mata)

mdensity
SSC (NJC)
univariate kernel density estimation, for variables or groups
sup(SSC multidensity}

mipolate
SSC (NJC)
interpolation of missing values
+

missingplot
SSC (NJC)
plot showing patterns of missing values in a dataset
+

missings
SSC (NJC)
various utilities for managing missing values (1)
sup(SJ 23-2)

missings
dm0085 sj15-4
various utilities for managing missing values (2)
sup(SJ 23-2)

missings
dm0085_1 sj17-3
various utilities for managing missing values (3)
sup(SJ 23-2)

missings
dm0085_2 sj20-4
various utilities for managing missing values (3)
sup(SJ 23-2)

missings
dm0085_3 sj23-2
various utilities for managing missing values (4)
+

mlowess
SSC (NJC)
lowess smoothing with multiple predictors
pobs(OS npregress}

mnthplot
SSC (NJC)
scatter plots for monthly data with repetition of data

modeldiag
SSC (NJC)
generate graphics after regression
(sup SJ 23-1)

modeldiag
gr0009 sj4-4 (NJC)
generate graphics after regression
sup(SJ 23-1)

modeldiag
gr0009_1 sj10-1 (NJC)
generate graphics after regression
sup(SJ 23-1)

modeldiag
gr0009_2 sj23-1 (NJC)
generate graphics after regression
+

modes
sg113 stb50 (NJC)
tabulation of modes (1)
sup(SJ 9-4)

modes
sg113_1 sj3-2 (NJC)
tabulation of modes (2)
sup(SJ 9-4)

modes
sg113_2 sj9-4 (NJC)
tabulation of modes (3)
+

moments
SSC (NJC)
moment-based statistics
+

moreobs
SSC (NJC)
add observations to dataset

moss
SSC (R. Picard, NJC)
multiple occurrences of substrings
+

movsumm
sg85 stb44 (NJC)
moving summaries
obs(OS rolling)

mrunning
gr0017 sj5-3 (P. Royston, NJC)
multivariable scatterplot smoother
pobs(OS npregress)

msplot
SSC (NJC)
multiple median-spline plots

mstdize
SSC (NJC)
marginal standardization of two-way tables

multencode
SSC (NJC)
encode multiple string variables into numeric
+

multidensity
SSC (NJC)
Kernel density estimation for one or more variables or groups
+

multidot
SSC (NJC)
multiple panel dot charts and similar
+

multiline
SSC (NJC)
multiple panel line plots
+

multqplot
gr0053 sj12-3 (NJC)
multiple quantile plots
sup(SJ 19-3)

multqplot
gr0053_1 sj19-3 (NJC)
multiple quantile plots
+

muxplot
SSC (NJC)
scatter plots with y vs multiple x variables
obs(OS graph)

muxyplot
SSC (NJC)
scatter plots with multiple x and y variables
obs(OS graph)

mvcorr
SSC (C.F. Baum, NJC)
moving-window correlation or autocorrelation in time series
pobs(OS rolling)

mvsumm
SSC (C.F. Baum, NJC)
moving-window descriptive statistics in time series
pobs(OS rolling)

myaxis
SSC (NJC)
reorder categorical variable by specified sort criterion
+

myaxis
st0654 sj21-3 (NJC)
reorder categorical variable by specified sort criterion
+

mycolours
SSC (NJC)
set palette of colours through local macros
+

mylabels
SSC (NJC, S. Merryman)
axis labels or ticks on transformed scales
psup(SJ 24-1)

mylabels
gr0092 (sj22-4) (NJC)
axis labels or ticks on transformed scales
sup(SJ 24-1)

mylabels
gr0092_1 (sj24-1) (NJC)
axis labels or ticks on transformed scales
+

mypkg
SSC (NJC)
inform on packages installed over net

myweeks
SSC (NJC)
numbered weeks from daily dates
+

nbfit
SSC (NJC, R.G. Gutierrez)
fitting negative binomial distribution by maximum likelihood

nearest
SSC (NJC)
calculate nearest neighbours from point coordinates

nicedates
SSC (NJC)
nice dates, especially for time series graphs

nicelabels
SSC (NJC)
nice axis labels for general scales
sup(SJ 22-4)

nicelabels
gr0092 (sj22-4) (NJC)
nice axis labels for general scales
+

niceloglabels
SSC (NJC)
nice axis labels for logarithmic scales (1)
sup(SJ 20-4)

niceloglabels
gr0072 sj18-1 (NJC)
nice axis labels for logarithmic scales (2)
sup(SJ 20-4)

niceloglabels
gr0072_1 sj20-4 (NJC)
nice axis labels for logarithmic scales (3)
+

nmissing
dm67 stb49 (NJC)
numbers of missing and present values (1)
sup(missings)

nmissing
dm67_1 stb60 (NJC)
numbers of missing and present values (2)
sup(missings)

nmissing
dm67_2 sj3-4 (NJC)
numbers of missing and present values (3)
sup(missings)

nmissing
SSC (NJC)
numbers of missing and present values (4)
sup(missings)

nmissing
dm67_3 sj5-4 (NJC)
numbers of missing and present values (5)
sup(missings)

nmissing
dm67_4 sj15-4 (NJC)
numbers of missing and present values (6)
sup(missings)

nnipolate
SSC (NJC)
nearest neighbour interpolation
sup(SSC mipolate)

nruns
st0044_1 sj6-4 (N. Smeeton, NJC)
number of runs compared with random shuffles
+

ntimeofday, stimeofday
dm0018 sj6-1 (NJC)
generate time of day variables
pobs(OS dates and times)

numdate
SSC (NJC)
generate numeric date-time variable
+

nvars
SSC (NJC)
count number of variables
obs(OS describe, c(k))

omninorm
SSC (C.F. Baum, NJC)
omnibus test for univariate or multivariate normality
+ (but cf. OS mvtest normality)

onewplot
SSC (NJC)
oneway plots (for Stata 6)
sup(SSC stripplot)

onewayplot
SSC (NJC)
oneway plots (for Stata 8)
sup(SSC stripplot)

ordplot
SSC (NJC)
cumulative distribution plots of ordinal variable
sup(SSC distplot)

outfix2
SSC (NJC)
output formatted data
obs(OS file)

pairplot
SSC (NJC)
paired observations plots
+

panelthin
SSC (NJC)
identify observations for possible thinned panel dataset
+

parplot
SSC (NJC)
parallel coordinates plots
+

pbeta
SSC (NJC)
probability plots for data vs fitted beta distribution
+

pcacoefsave
SSC (NJC)
save results of PCA to new dataset
+

pchipolate
SSC (NJC)
piecewise cubic Hermite interpolation
sup(SSC mipolate)

pdplot
SSC (NJC)
Pareto dot plots
+

personage
SSC (NJC)
calculate people's ages or similar daily date differences
sup(OS functions introduced Stata 17)

pexp
SSC (NJC)
probability plots for data vs fitted exponential distribution
+

pgamma
SSC (NJC)
probability plots for data vs fitted gamma distribution
+

pieplot
SSC (NJC)
plot pie charts of categorical frequencies

ppplot
SSC (NJC)
P-P plots
+

psbayes
SSC (NJC)
pseudo-Bayes smoothing of cell estimates
sup(SJ qsbayes)

pwcorrw
SSC (NJC)
print wide correlation matrix with significance indicators

pweibull
SSC (NJC)
probability plots for data vs fitted Weibull distribution
+

qbeta
SSC (NJC)
quantile-quantile plots for data vs fitted beta distribution
+

qenv: qenvnormal, qenvgamma, etc.
SSC (M.L. Buis, NJC)
generate quantile envelopes for quantile-quantile plots
+

qexp
SSC (NJC)
quantile-quantile plots for data vs fitted exponential distribution
+

qgamma
SSC (NJC)
quantile-quantile plots for data vs fitted gamma distribution
+

qlognorm
SSC (NJC)
diagnostic plots for lognormal distribution
sup(SSC qpfit)

qpfit
SSC (NJC)
various quantile and probability plots for assessing distribution fit
+

qplot
gr42_2 sj4-1 (NJC)
quantile plots, generalized (4)
sup(SJ 19-3)

qplot
gr42_3 sj5-3 (NJC)
quantile plots, generalized (5)
sup(SJ 19-3)

qplot
gr42_4 sj6-4 (NJC)
quantile plots, generalized (6)
sup(SJ 19-3)

qplot
gr42_5 sj10-4 (NJC)
quantile plots, generalized (7)
sup(SJ 19-3)

qplot
gr42_6 sj12-1 (NJC)
quantile plots, generalized (8)
sup(SJ 19-3)

qplot
gr42_6 sj16-3 (NJC)
quantile plots, generalized (9)
sup(SJ 19-3)

qplot
gr42_7 sj19-3 (NJC)
quantile plots, generalized (10)
+

qqplot2
SSC (NJC)
quantile-quantile plots
obs(OS qqplot)

qqplotg
SSC
quantile-quantile plots, generalized
+

qsbayes, qsbayesi
st0168 sj9-2 (NJC)
quasi-Bayes smoothing
+

quantil2
gr42 stb51 (NJC)
quantile plots, generalized (1)
sup(SJ 12-1 qplot)

quantil2
gr42_1 stb61 (NJC)
quantile plots, generalized (2)
sup(SJ 12-1 qplot)

quantil2
SSC (NJC)
quantile plots, generalized (3)
sup(SJ 12-1 qplot)

qweibull
SSC (NJC)
quantile-quantile plots for data vs fitted Weibull distribution
+

rangerun
SSC (R. Picard, NJC)
run Stata commands on observations within range
+

rangestat
SSC (R. Picard, NJC, R. Ferrer)
generate statistics using observations within range
+

rcspline
SSC (NJC)
restricted cubic spline smoothing
+

regresby
SSC (NJC)
generate regression residuals by byvarlist
pobs(OS foreach, forval)

renames
SSC (NJC)
rename variables
sup(renvars, OS rename)

rensfix
dm83 stb59 (S.P. Jenkins, NJC)
rename variables and change suffix
sup(renvars, OS rename)

renvars
dm88 stb60 (NJC, J. Weesie)
rename variables, multiply and systematically
psup(OS rename)

renvars
dm88_1 sj5-4 (NJC, J. Weesie)
rename variables, multiply and systematically (2)
psup(OS rename)

reorder
SSC (NJC)
reorder variables in dataset, reversibly

roman
SSC (NJC)
handling Roman numerals and decimal equivalents
sup(SJ 11-1)

roman
dm0053 sj11-1 (NJC)
handling Roman numerals and decimal equivalents

romantoarabic
SSC (NJC)
converting Roman numerals to arabic numbers
sup(roman)

rowranks
SSC (NJC)
row ranks of a set of variables
sup(SJ 9-1)

rowranks
pr0046 sj9-1 (NJC)
row ranks of a set of variables
+

rowsort
SSC (NJC)
row sort a set of integer variables
sup(SJ 9-1)

rowsort
pr0046 sj9-1 (NJC)
row sort a set of variables
+

running
sed9_2 sj5-2 (P. Sasieni, P. Royston, NJC)
symmetric nearest neighbor linear smoothers
sup(SSC)

running
SSC (P. Sasieni, P. Royston, NJC)
symmetric nearest neighbor linear smoothers

safedrop
SSC (NJC)
drop variables if and only if varnames specified in full

savesome
SSC (NJC)
save subset of data

sbplot
SSC (NJC)

sbplot5
SSC (NJC)

scat3
SSC (NJC)
crude 3-dimensional graphics

sdline
SSC (NJC)
SD line (reduced major axis)
+

selectvars
SSC (NJC)
selecting all possible n-tuples from a varlist
sup(SSC tuples)

sepscatter
SSC (NJC)
scatter (or other twoway) plots separated by a third variable
+

seq
dm44 stb37 (NJC)
generate sequences of integers
obs(OS egen)

seq
SSC (NJC)
generate sequences of integers
obs(OS egen)

seqvar
gr0034 sj8-2 (NJC)
assign integer numlists to variables
+

shorth
SSC (NJC)
descriptive statistics based on shortest halves
+

showgph
SSC (J. Brogger, NJC)
show graphs previously saved

shownear
SSC (NJC)
show nearby values of numeric variable

Singh-Maddala etc.
gr35 stb48 (NJC)
plots for assessing Singh-Maddala and Dagum distributions
sup(qpfit)

skewplot
SSC (NJC)
skewness plots
+

sliceplot
SSC (NJC)
time series or other plot in slices
see also SJ 6-3

slideplot
SSC (NJC)
sliding bar plots for frequencies or percents
psup(floatplot)

sparkline
SSC (NJC)
sparkline-type plots
+

sparl
SSC (NJC)
scatter plots with y-x regression line
pobs(OS graph); sup(aaplot)

spautoc
SSC (NJC)
spatial autocorrelation (Moran and Geary measures)

spell
SSC (NJC, R. Goldstein)
identification of spells or runs of similar values
pobs(tsspell)

spikeplt
SSC (NJC, A. Brady)
spike plots showing fine structure of the data (1)
sup(OS spikeplot)

spikeplt
gr25 stb36 (NJC, A. Brady)
spike plots showing fine structure of the data (2)
sup(OS spikeplot)

spikeplt
gr25_1 stb40 (NJC, A. Brady)
spike plots showing fine structure of the data (3)
sup(OS spikeplot)

spineplot
SSC (NJC)
spine plots for two-way categorical data (1)
sup(SJ 16-2)

spineplot
gr0031 sj8-1 (NJC)
spine plots for two-way categorical data (2)
sup(SJ 16-2)

spineplot
gr0031_1 sj16-2 (NJC)
spine plots for two-way categorical data (3)
+

split
SSC (NJC)
splitting string variables into parts
sup(OS split)

sqr
SSC (NJC)
make graphs square, or any other shape
obs(OS graph)

sssplot
SSC (NJC)
seasonal subseries plots
sup(cycleplot)

statplot
SSC (E.A. Booth, NJC)
plots of summary statistics
+

statsmat
SSC (NJC, C.F. Baum)
descriptive statistics in matrix

stbget
SSC (NJC)
get packages from Stata Technical Bulletin

stemplot
gr0028 sj7-3 (NJC)
stem-and-leaf plots
+

sto
SSC (NJC)
toggle trace switch
obs(OS trace)

storecmd
SSC (NJC)
store and repeat commands using characteristics

strgen
SSC (NJC)
generate string variables without knowing string type
obs(OS generate)

stripplot
SSC (NJC)
strip plots
+

strparse
SSC (M. Blasnik, NJC)
parse string variables
obs(OS split)

stylerules
SSC (NJC)
suggestions on programming style
sup(see SJ 5: 560-566, 2005)

subsetplot
SSC (NJC)
plots for each subset with rest of the data as backdrop
sup(fabplot)

summdate
SSC (NJC)
summarizing date variable

swapval
SSC (NJC)
swapping values of two variables

swor
dm86 stb59 (NJC)
sampling without replacement (1)
pobs(OS sample)

swor
dm0086_1 sj5-1 (NJC)
sampling without replacement (2)
pobs(OS sample)

sxpose
SSC (NJC)
transpose string variable dataset

t2way5
SSC (NJC)
Tukey's two-way analysis by medians (update of t2way)

tab2i
sg57 stb33 (NJC)
immediate command for two-way tables
sup(tab_chi)

tab_chi
www.stata.com/users/njc (NJC)
tabulation and chi-square tasks (1)
sup(SSC)

tab_chi
SSC (NJC)
tabulation and chi-square tasks (2)
+ (chitest/chitesti/tabsplit/tabm)

taba
SSC (NJC)
tabulation of frequencies

tabcond
SSC (NJC)
tabulate frequencies satisfying specified conditions

tabcount
SSC (NJC)
tabulate frequencies, with zeros explicit
+

tabexport
SSC (NJC)
export tables of summary statistics to text files

tabhbar
SSC (NJC)
table of frequencies as horizontal bar chart
obs(catplot)

tabhplot
SSC (NJC)
table of frequencies as horizontal plots
obs(catplot)

tablab
SSC (NJC)
autocrosstabulate a variable
pobs(OS numlabel)

tablepc
SSC (NJC)
percent calculation prior to table

tableplot
SSC (NJC)
graphical display in two-way table format

tabmerge
SSC (NJC)
tabulate report on merge

tabplot
gr0066 sj16-2 (NJC)
one-, two- and three-way bar charts for tables (1)
sup(SJ 22-2)

tabplot
gr0066_1 sj17-3 (NJC)
one-, two- and three-way bar charts for tables (2)
sup(SJ 22-2)

tabplot
SSC (NJC)
one-, two- and three-way bar charts for tables (3)
+

tabplot
gr0066_2 sj20-3 (NJC)
one-, two- and three-way bar charts for tables (4)
+

tabplot
gr0066_3 sj22-2 (NJC)
one-, two- and three-way bar charts for tables (4)
+

tails
www.stata.com/meetings/6uk (NJC)
plotting and fitting distributions with long or heavy tails

textbarplot
SSC (NJC)
horizontal text and bar plot
use labmask and seqvar instead

text editors
texteditors.html
some notes on text editors for Stata users

tkdensity
SSC (NJC)
kernel density estimation, calculation on transformed scale
sup(SSC multidensity)

todate
SSC (NJC)
generate date variables from run-together date variables
psup(OS date()), pobs(numdate)

tolower
SSC (NJC)
rename variables with lower case names
sup(renvars; OS rename)

tomode
SSC (NJC, F. Wolfe)
change values of a variable to mode(s)
sup(STB 50, OS egen)

topichlp
www.stata.com/users/njc (NJC)
help files on various general topics
sup(SSC)

torats
SSC (C.F. Baum, NJC)
facilitate transfer of data to RATS

tostring
www.stata.com/users/jwernow (NJC, J.B. Wernow)
change numeric variables to string
sup(OS tostring)

tostring
dm80 stb56 (NJC, J.B. Wernow)
change numeric variables to string
sup(OS tostring)

tostring
dm80_1 stb57 (NJC, J.B. Wernow)
change numeric variables to string (update)
sup(OS tostring)

tpvar
SSC (NJC)
turning-point variable for graphics labelling
obs(OS graph)

transint
SSC (NJC)
help files for transformations
+

transplot
SSC (NJC)
plots for trying out transformations
+

trimmean
SSC, st0313 sj13-3 (NJC)
trimmed means as descriptive statistics
+

trimplot
SSC, st0313 sj13-3 (NJC)
plots of trimmed means
+

triplot
SSC (NJC)
triangular plots
+

tsegen
SSC (R. Picard, NJC)
invoke an egen function using a tsvarlist as argument
+

tsgraph
SSC (NJC, C.F. Baum)
time series line graphs
obs(OS graph)

tsspell
SSC (NJC)
identification of spells or runs in time series
+

tuples
SSC (J.N. Luchman, D. Klein, NJC)
selecting all possible tuples from a list
+

tuples8
SSC (J.N. Luchman, NJC)
selecting all possible tuples from a list
Stata 8 or 9 only

twoway__whistogram_gen
SSC
histogram subroutine supporting aweights and iweights
+

univstat
www.stata.com/users/njc (NJC)
summary statistics in matrix form (1)
sup(SSC)

univstat
SSC (NJC)
summary statistics in matrix form (2)

upsetplot
SSC (T. Morris, NJC)
Euler or Venn diagrams mapped to bar charts, upsetplot style
+

vallab
SSC (NJC)
pack values and labels into a new string variable
pobs(OS numlabel)

vallist
dm90 stb60 (NJC)
listing distinct values of a variable
sup(OS levelsof)

variog
SSC (NJC)
calculate and graph semi-variograms

vbar
gr24 stb36 (NJC)
vertical bar charts (1)
obs(OS graph, catplot)

vbar
gr24_1 stb40 (NJC)
vertical bar charts (2)
obs(OS graph, catplot)

vclose
SSC (NJC)
close viewer windows

vennbar
SSC (NJC, T. Morris)
Euler or Venn diagrams mapped to bar or dot charts
+

vplplot
paired data plots
sup(pairplot)

vreverse
SSC (NJC)
reverse existing categorical variable

wbull
SSC (NJC)
fit Weibull distribution by maximum likelihood
sup(weibullfit)

weibullfit
SSC (NJC, S.P. Jenkins)
fit two-parameter Weibull distribution
+

whitetst
SSC (C.F. Baum, NJC)
tests for heteroskedasticity in regression error distribution
sup(STB 55)

whitetst
sg137 stb55 (C.F. Baum, NJC, V. Wiggins)
tests for heteroskedasticity in regression error distribution
psup(OS imtest)

winsor
SSC (NJC)
Winsorize a variable

xcorplot
SSC (NJC, A. Tobias)
calculate and graph cross-correlation function
obs(OS xcorr)

xtpattern
SSC (NJC)
code showing pattern of xt data

xtpatternvar
SSC (NJC)
generate variable describing panel patterns
+

xttrans2
SSC (NJC)
tables of transition probabilities

zmap
SSC (NJC)
binned scatter maps
+

Author

Nicholas J. Cox, Durham University

n.j.cox@durham.ac.uk