Skip to main content

Research Repository

Advanced Search

Dr Nicholas Cox's Outputs (108)

Speaking Stata: Quantile–quantile plots, generalized (2024)
Journal Article
Cox, N. J. (2024). Speaking Stata: Quantile–quantile plots, generalized. The Stata Journal, 24(3), 514-534. https://doi.org/10.1177/1536867x241276114

Quantile-quantile plots in the precise sense of scatterplots showing corresponding quantiles of two variables have long been supported by official command qqplot. That command is generalized here in several ways in a new command, qqplotg. In this art... Read More about Speaking Stata: Quantile–quantile plots, generalized.

Speaking Stata: The joy of sets: Graphical alternatives to Euler and Venn diagrams (2024)
Journal Article
Cox, N. J., & Morris, T. P. (2024). Speaking Stata: The joy of sets: Graphical alternatives to Euler and Venn diagrams. The Stata Journal, 24(2), 329-361. https://doi.org/10.1177/1536867x241258010

Membership of overlapping or intersecting sets may be recorded in a bundle of (0, 1) indicator variables. Annotated Euler or Venn diagrams may be used to show graphically the frequencies of subsets so defined, but beyond just a few sets such diagrams... Read More about Speaking Stata: The joy of sets: Graphical alternatives to Euler and Venn diagrams.

Speaking Stata: Finding the denominator: Minimum sample size from percentages (2023)
Journal Article
Cox, N. J. (2023). Speaking Stata: Finding the denominator: Minimum sample size from percentages. The Stata Journal, 23(4), 1086-1095. https://doi.org/10.1177/1536867x231212453

Percentage breakdowns for a series of classes or categories are sometimes reported without a specification of class frequencies or even the total sample size. This column surveys the problem of estimating the minimum sample size and class frequencies... Read More about Speaking Stata: Finding the denominator: Minimum sample size from percentages.

Speaking Stata: Replacing missing values: The easiest problems (2023)
Journal Article
Cox, N. J. (2023). Speaking Stata: Replacing missing values: The easiest problems. The Stata Journal, 23(3), 884-896. https://doi.org/10.1177/1536867x231196519

Missing values are common in real datasets, and what to do about them is a large and challenging question. This column focuses on the easiest problems in which a researcher is clear, or at least highly confident, about what missing values should be i... Read More about Speaking Stata: Replacing missing values: The easiest problems.

Stata tip 151: Puzzling out some logical operators (2023)
Journal Article
Cox, N. J. (2023). Stata tip 151: Puzzling out some logical operators. The Stata Journal, 23(1), https://doi.org/10.1177/1536867x231162009

The logical operators & (“and”) and | (“or”) can sometimes be tricky in statistical software such as Stata. They are extremely useful, so you need to understand thoroughly how they work. Any trickiness arises mostly in translating from ordinary langu... Read More about Stata tip 151: Puzzling out some logical operators.

Speaking Stata: Automating axis labels: Nice numbers and transformed scales (2022)
Journal Article
Cox, N. J. (2022). Speaking Stata: Automating axis labels: Nice numbers and transformed scales. The Stata Journal, 22(4), 975-995. https://doi.org/10.1177/1536867x221141058

Two common problems with graph axis labels are to decide in advance on some “nice” numbers to use on one or both axes and to show particular labels on some transformed scale. In this column, I discuss the nicelabels and mylabels commands, which addre... Read More about Speaking Stata: Automating axis labels: Nice numbers and transformed scales.

Speaking Stata: The largest five - A tale of tail values (2022)
Journal Article
Cox, N. J. (2022). Speaking Stata: The largest five - A tale of tail values. The Stata Journal, 22(2), 446-459. https://doi.org/10.1177/1536867x221106436

How do you work with the largest five, or smallest five, or any other fixed number of values in a tail of a distribution? In this column, I give examples of problems and code for basic calculations as a prelude to graphics, tables, and more detailed... Read More about Speaking Stata: The largest five - A tale of tail values.

Speaking Stata: Ordering or ranking groups of observations (2021)
Journal Article
Cox, N. J. (2021). Speaking Stata: Ordering or ranking groups of observations. The Stata Journal, 21(3), 818-837. https://doi.org/10.1177/1536867x211045582

Results for categorical variables may often be clearer if those variables are reordered or reranked, say, according to some measure of absolute or relative frequency or according to summaries of some other variable. Some graphical and tabulation comm... Read More about Speaking Stata: Ordering or ranking groups of observations.

Speaking Stata: Front-and-back plots to ease spaghetti and paella problems (2021)
Journal Article
Cox, N. J. (2021). Speaking Stata: Front-and-back plots to ease spaghetti and paella problems. The Stata Journal, 21(2), 539-554. https://doi.org/10.1177/1536867x211025838

The spaghetti problem arises in graphics when multiple time series or other functional traces show mostly a tangled mess. The related paella problem (often experienced but not usually named as such) arises for multiple patterns combined in scatterplo... Read More about Speaking Stata: Front-and-back plots to ease spaghetti and paella problems.

Fan‐surface evidence for debris‐flow avulsion controls and probabilities, Saline Valley, California (2019)
Journal Article
Haas, T., Densmore, A., Hond, T., & Cox, N. (2019). Fan‐surface evidence for debris‐flow avulsion controls and probabilities, Saline Valley, California. Journal of Geophysical Research: Earth Surface, 124(5), 1118-1138. https://doi.org/10.1029/2018jf004815

Debris‐flow fans form by shifts of the active channel, termed avulsions. Field and experimental evidence suggest that debris‐flow avulsions may be induced by depositional lobes that locally plug a channel or super‐elevation of the channel bed above t... Read More about Fan‐surface evidence for debris‐flow avulsion controls and probabilities, Saline Valley, California.