Each of these packages can be installed from the provided command, which
will enable the use of adoupdate
to keep them updated.
Alternatively, feel free to grab the code directly from the repositories.
Creating spaghetti plots in Stata that are readable with large amounts of data.
Spaghetti plots (line plots over time for multiple groups/individuals)
are handy tools for data exploration, but become unreadble rapidly as
the number of groups/individuals increases. To address this, the
angelhair
command (named after
the skinny spaghetti)
produces a spaghetti plot where all groups/individuals are plotted, but
a small random selected number of groups/individuals are highlighted so
show individual trends.
Install the package with
net install angelhair, from("https://errickson.net/angelhair")
Produces a visualization of the random intercepts in a mixed effects model.
Generates a scatterplot of the random effects from the model, along with confidence bounds. The points are re-ordered to produce an easier to see visualization. If the model includes multiple random effects, you can choose from which level to visualize.
Install the package with
net install ranefplot, from("https://errickson.net/ranefplot")
A collection of commands I use for personal work.
numlevels
: Returns the number of unique values in a
variable. Similar to printing r(r)
after a
levelsof
command, but quicker.
fencode
: Encodes string variables to numeric with
labels, essentially allowing encode, replace
.
isconstant
: Checks whether a variable is constant,
optionally within each level of a grouping variable.
timing
: A prefix (e.g. called as
timing: command
) to produce timing benchmark
information.
bvtable
: When a command (such as nlcom
)
returns only r(b)
and r(V)
instead of
r(table)
(which includes p-value and CI), this will
generate a matrix table
.
standardize
: A direct command to mean-center and
optionally scale multiple variables.
net install kublakhan, from("https://errickson.net/kublakhan")
This work is licensed under CC BY-NC 4.0