---
title: "A Description of Every Data Set in `stevedata`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{stevedata-description}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
options(rmarkdown.html_vignette.check_title = FALSE)
```

```{r setup}
library(stevedata)
library(knitr)
library(tibble)
library(tools)
```

The initial release of this package is not allowing this vignette to compile dynamically. Until then, note the following script will produce the following table.


```{r, echo=T, eval=F}
alldata <- data(package = "stevedata")

getdescript <- function(package){
  db <- tools::Rd_db(package)
  descript <- lapply(db,function(x) {
    tags <- tools:::RdTags(x)
    if("\\description" %in% tags){
      out <- paste(unlist(x[which(tags=="\\description")]),collapse="")
    }
    else
      out <- NULL
    invisible(out)
  })
  gsub("\n","",unlist(descript))
}

descripts <- getdescript("stevedata")

object_name <- paste0("`",alldata$results[, "Item"],"`")
object_link <- paste0("[",object_name,"](https://github.com/svmiller/stevedata/blob/master/man/",alldata$results[, "Item"],".Rd)")


tibble(`**Object Name**` = object_link,
       `**Description**` = descripts) -> tibs

kable(tibs, format="markdown")

```


| **Object Name**                                                                                           | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| :-------------------------------------------------------------------------------------------------------- | :  |
| [`aluminum_premiums`](https://github.com/svmiller/stevedata/blob/master/man/aluminum_premiums.Rd)         | A near daily data set on the price of aluminum premiums (USD/MT) for LME in the U.S., Western Europe, East Asia, and Southeast Asia. I like these data as illustrative of some of the shortsightedness of the aluminum tariffs that Donald Trump announced in March 2018. The tariffs had no discernible effect on manufacturing employment or earnings, but they created a supply shock that made aluminum more expensive.                                                                                                                                                                                                                                                                |
| [`anes_prochoice`](https://github.com/svmiller/stevedata/blob/master/man/anes_prochoice.Rd)               | A simple data set for in-class illustration about how to estimate and interpret interactive relationships. The data here are deliberately minimal for that end.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`Arca`](https://github.com/svmiller/stevedata/blob/master/man/Arca.Rd)                                   | Daily data on the NYSE Arca Steel Index. These data are useful for me in teaching how Trump’s 2018 steel tariffs didn’t do much good for the steel industry.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [`arcticseaice`](https://github.com/svmiller/stevedata/blob/master/man/arcticseaice.Rd)                   | This data set from Connelly et al. (2017) measures the Arctic sea ice extent in 10^6 square kilometers. It includes lower bounds and upper bounds on annual averages.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`arg_tariff`](https://github.com/svmiller/stevedata/blob/master/man/arg_tariff.Rd)                       | Simple mean tariff rate for Argentina, starting in 1980. The goal is to keep these data current.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [`asn_stats`](https://github.com/svmiller/stevedata/blob/master/man/asn_stats.Rd)                         | These are yearly counts on air accidents and fatalities, including measures for corporate jet accidents and hijackings. The hijackings are of particular interest to me, at least from a historical terrorism perspective.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`CFT15`](https://github.com/svmiller/stevedata/blob/master/man/CFT15.Rd)                                 | This is the replication data for “Randomization Inference in the Regression Discontinuity Design: An Application to Party Advantages in the U.S. Senate”, published in 2015 in Journal of Causal Inference. I use these data to teach about regression discontinuity designs.                                                                                                                                                                                                                                                                                                                                                                                                              |
| [`clemson_temps`](https://github.com/svmiller/stevedata/blob/master/man/clemson_temps.Rd)                 | This data set contains daily temperatures (highs) for Clemson, South Carolina from Jan. 1, 1930 to the end of the most recent calendar year. The goal is to update this periodically with new data for as long as I live in this town.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [`co2emissions`](https://github.com/svmiller/stevedata/blob/master/man/co2emissions.Rd)                   | This is a sample data set, cobbled from various sources, about carbon dioxide emissions in the history of the planet from 800,000 BCE to the most recently concluded calendar year. I use this for a data visualization example for a lecture on climate change and international politics. Data communicate yearly averages/estimates.                                                                                                                                                                                                                                                                                                                                                    |
| [`coffee_imports`](https://github.com/svmiller/stevedata/blob/master/man/coffee_imports.Rd)               | A simple time series on coffee imports for select importing countries (i.e. European Union + Japan + Russia + Tunisia + United States).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [`coffee_price`](https://github.com/svmiller/stevedata/blob/master/man/coffee_price.Rd)                   | This is primary commodity price data for coffee (Arabica, Robustas) from 1980 to the present. I manually update these data since FRED’s coverage since 2017 has been spotty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [`CP77`](https://github.com/svmiller/stevedata/blob/master/man/CP77.Rd)                                   | This is a simple data set provided by Chatterjee and Price (1977, p. 108) that serves as a known example of heteroscedasticity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`Datasaurus`](https://github.com/svmiller/stevedata/blob/master/man/Datasaurus.Rd)                       | An illustrative exercise in never trusting the summary statistics without also visualizing them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [`Dee04`](https://github.com/svmiller/stevedata/blob/master/man/Dee04.Rd)                                 | This should be a data set for a (partial?) replication of Dee’s (2004) article on the purported civics returns to education. I use these data for in-class illustration about instrumental variable analyses.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [`DJIA`](https://github.com/svmiller/stevedata/blob/master/man/DJIA.Rd)                                   | This data set contains the value of the Dow Jones Industrial Average on daily close for all available dates (to the best of my knowledge) from 1885 to the most recently concluded calendar year. Extensions shouldn’t be too difficult with existing packages.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`DST`](https://github.com/svmiller/stevedata/blob/master/man/DST.Rd)                                     | These are fatalities (and, in the case of terrorism, casualties as well) for drunk-driving, suicide, and acts of terrorism in the U.S. spanning 1970 to 2018. Only one of these is sufficiently important to command public attention despite being the least severe public bad. Do you want to guess which one?                                                                                                                                                                                                                                                                                                                                                                           |
| [`election_turnout`](https://github.com/svmiller/stevedata/blob/master/man/election_turnout.Rd)           | A simple data set on education and state-level (+ DC) turnout in the 2016 presidential election. This is inspired by what Pollock (2012) does in his book.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`eq_passengercars`](https://github.com/svmiller/stevedata/blob/master/man/eq_passengercars.Rd)           | Data from the International Monetary Fund for the export quality and unit/trade value of passenger cars for all available countries and years from 1963 to 2014.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [`ESS9GB`](https://github.com/svmiller/stevedata/blob/master/man/ESS9GB.Rd)                               | This is a replication data originally set to accompany a blog post and presentation to students at the University of Nottingham in March 2020. However, COVID-19 led to the cancellation of the talk.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`ESSBE5`](https://github.com/svmiller/stevedata/blob/master/man/ESSBE5.Rd)                               | This is a sample data set cobbled from the fifth round of European Social Survey data for Belgium. It offers a means to do a basic replication of some of Chapter 5 of The SAGE Handbook of Regression Analysis and Causal Inference.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`eustates`](https://github.com/svmiller/stevedata/blob/master/man/eustates.Rd)                           | European Union membership by accession date                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [`fakeAPI`](https://github.com/svmiller/stevedata/blob/master/man/fakeAPI.Rd)                             | This is a hypothetical universe of schools in a given territorial unit, patterned off the apipop data available in the survey package.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [`fakeLogit`](https://github.com/svmiller/stevedata/blob/master/man/fakeLogit.Rd)                         | This is a simple fake data set to illustrate a logistic regression.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`fakeTSCS`](https://github.com/svmiller/stevedata/blob/master/man/fakeTSCS.Rd)                           | This is a toy (i.e. “fake”) data set created by the fabricatr package. There are 100 observations for 25 hypothetical countries. The outcome y is a linear function of a baseline for each hypothetical country, plus a yearly growth trend as well as varying growth errors for each country. x1 is supposed to have a linear effect of .5 on y, all things considered. x2 is supposed to have a linear effect of 1 on y for each unit change in x2, all things considered.                                                                                                                                                                                                               |
| [`fakeTSD`](https://github.com/svmiller/stevedata/blob/master/man/fakeTSD.Rd)                             | This is a toy (i.e. “fake”) data set created by the fabricatr package. There are 100 observations. The outcome y is a linear function of 20 + (.25 \* year) + .(25 \* x1) + (1 \* x2) + e. This clearly implies some autocorrelation in the data. I.e. it’s a time-series.                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`ghp100k`](https://github.com/svmiller/stevedata/blob/master/man/ghp100k.Rd)                             | This is the yearly rate of gun homicides per 100,000 people in the population, selecting on “Western” countries of interest.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [`gss_abortion`](https://github.com/svmiller/stevedata/blob/master/man/gss_abortion.Rd)                   | This is a toy data set derived from the General Social Survey that I intend to use for several purposes. First, the battery of abortion items can serve as toy data to illustrate mixed effects modeling as equivalent to a one-parameter (Rasch) model. Second, I include some covariates to also do some basic regressions. I think abortion opinions are useful learning tools for statistical inference for college students. Third, there’s a time-series component as well for understanding how abortion attitudes have changed over time.                                                                                                                                          |
| [`gss_spending`](https://github.com/svmiller/stevedata/blob/master/man/gss_spending.Rd)                   | This is a toy data set that collects attitudes on toward national spending for various things in the General Social Survey for 2018. I use these data for in-class illustration about ordinal variables and ordinal models.                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [`gss_wages`](https://github.com/svmiller/stevedata/blob/master/man/gss_wages.Rd)                         | Wage data from the General Social Survey (1974-2018) to illustrate wage discrepancies by gender (while also considering respondent occupation, age, and education).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`Guber99`](https://github.com/svmiller/stevedata/blob/master/man/Guber99.Rd)                             | A data set for a canonical case of a Simpson’s paradox, useful for in-class instruction on the topic.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`illiteracy30`](https://github.com/svmiller/stevedata/blob/master/man/illiteracy30.Rd)                   | This is perhaps the canonical data set for illustrating the ecological fallacy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`LOTI`](https://github.com/svmiller/stevedata/blob/master/man/LOTI.Rd)                                   | These data contain monthly mean temperature anomalies expressed as deviations from the corresponding 1951-1980 means. They are useful for showing how we can measure climate change.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [`LTPT`](https://github.com/svmiller/stevedata/blob/master/man/LTPT.Rd)                                   | These data are a monthly time-series of changes in the consumer price index relative to a Dec. 1997 starting date for televisions, computers, and related items. I use this as in-class illustration that globalization has made consumer electronics cheaper across the board for Americans.                                                                                                                                                                                                                                                                                                                                                                                              |
| [`LTWT`](https://github.com/svmiller/stevedata/blob/master/man/LTWT.Rd)                                   | “Let Them Watch TV”: These data contain price indices for various items for the general urban consumer. Categories include medical services, college tuition, college textbooks, child care, housing, food and beverages, all items (i.e. general CPI), new vehicles, apparel, and televisions. The base period in value was originally the 1982-4 average, but I converted the base period to January 2000. I use these data for in-class discussion about how liberalized trade has made consumer electronics (like TVs) fractions of their past prices. Yet, young adults face mounting costs for college, child-raising, and health care that government policy has failed to address. |
| [`mm_mlda`](https://github.com/svmiller/stevedata/blob/master/man/mm_mlda.Rd)                             | These are data you can use to replicate the regression discontinuity design analyses throughout Chapter 4 of Mastering ’Metrics. Original analyses come from Carpenter and Dobkin (2009, 2011).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`mm_nhis`](https://github.com/svmiller/stevedata/blob/master/man/mm_nhis.Rd)                             | These are data from the 2009 NHIS survey. People who have read Mastering ‘Metrics should recognize these data. They’re featured prominently in that book and the authors’ discussion of random assignment and experiments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`mm_randhie`](https://github.com/svmiller/stevedata/blob/master/man/mm_randhie.Rd)                       | These are data from the RAND Health Insurance Experiment (HIE).People who have read Mastering ‘Metrics should recognize these data. They’re featured prominently in that book and the authors’ discussion of random assignment and experiments.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`mvprod`](https://github.com/svmiller/stevedata/blob/master/man/mvprod.Rd)                               | Data, largely from Organisation Internationale des Constructeurs d’Automobiles (OICA), on motor vehicle production in various countries (and the world totals) from 1950 to 2019 at various intervals. Tallies include production of passenger cars, light commercial vehicles, minibuses, trucks, buses and coaches.                                                                                                                                                                                                                                                                                                                                                                      |
| [`nesarc_drinkspd`](https://github.com/svmiller/stevedata/blob/master/man/nesarc_drinkspd.Rd)             | This toy data set is loosely modified from Wave I of the NESARC data set. Here, my main interest is the number of drinks consumed on a usual day drinking alcohol in the past 12 months, according to respondents in the nationally representative survey of 43,093 Americans.                                                                                                                                                                                                                                                                                                                                                                                                             |
| [`Newhouse77`](https://github.com/svmiller/stevedata/blob/master/man/Newhouse77.Rd)                       | These are the data in Newhouse’s (1977) simple OLS model from 1977. In his case, he’s trying to explain medical care expenditures as a function of GDP per capita for these countries. It’s probably the easiest OLS model I can find in print because Newhouse helpfully provides all the data in one simple table.                                                                                                                                                                                                                                                                                                                                                                       |
| [`ODGI`](https://github.com/svmiller/stevedata/blob/master/man/ODGI.Rd)                                   | The NOAA Earth System Research Laboratory has an “ozone depleting gas index” (ODGI) data set from 1992 to 2018. This dataset summarizes Table 1 and Table 2 from its website. The primary interest here (for my purposes) is the ODGI indices (including the new 2012 measure). The data set includes constituent greenhouse gases/chlorines as well in parts per trillion. The primary use here is for in-class illustration.                                                                                                                                                                                                                                                             |
| [`Presidents`](https://github.com/svmiller/stevedata/blob/master/man/Presidents.Rd)                       | This should be self-evident. Here are all U.S. presidents who have completed their terms in office (i.e. excluding the current one).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [`pwt_sample`](https://github.com/svmiller/stevedata/blob/master/man/pwt_sample.Rd)                       | These are some macroeconomic data for 21 select (rich) countries. I’ve used these data before to discuss issues of grouping and skew in cross-sectional data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [`quartets`](https://github.com/svmiller/stevedata/blob/master/man/quartets.Rd)                           | These are four x-y data sets, combined into a long format, which have the same traditional statistical properties (mean, variance, correlation, regression line, etc.). However, they look quite different.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [`recessions`](https://github.com/svmiller/stevedata/blob/master/man/recessions.Rd)                       | Data on U.S. recessions, past to present. Data include information on contraction, expansion, and cycle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [`SCP16`](https://github.com/svmiller/stevedata/blob/master/man/SCP16.Rd)                                 | County-level data on vote share and various background/demographic information for the 2016 South Carolina GOP/Democratic primaries.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [`sealevels`](https://github.com/svmiller/stevedata/blob/master/man/sealevels.Rd)                         | These data describe how sea level has changed over time, in both relative and absolute terms. Absolute sea level change refers to the height of the ocean surface regardless of whether nearby land is rising or falling.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [`so2concentrations`](https://github.com/svmiller/stevedata/blob/master/man/so2concentrations.Rd)         | This data set contains yearly observations by the Environmental Protection Agency on the concentration of sulfur dioxide in parts per billion, based on 35 sites. I use this for in-class illustration. Note that the national standard is 75 parts per billion.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [`steves_clothes`](https://github.com/svmiller/stevedata/blob/master/man/steves_clothes.Rd)               | I cobbled together this data set of the professional clothes (polos, long-sleeve dress shirts, pants) in my closet, largely for illustration on the origins of apparel in the U.S. for an intro lecture on trade.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`sugar_price`](https://github.com/svmiller/stevedata/blob/master/man/sugar_price.Rd)                     | This is primary commodity price data for sugar globally, in the United States, and in Europe for every month from 1980 to (roughly) the present. Prices are nominal U.S. cents per pound and are not seasonally adjusted (“NSA”).                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`therms`](https://github.com/svmiller/stevedata/blob/master/man/therms.Rd)                               | A data set on thermometer ratings for Donald Trump and Barack Obama in 2020. I use these data for in-class illustration of central limit theorem. Basically: the sampling distribution of a population is normal, even if the underlying population is decidedly not.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`TV16`](https://github.com/svmiller/stevedata/blob/master/man/TV16.Rd)                                   | These data come from the 2016 CCES and allow interested students to model the individual correlates of the Trump vote in 2016. Code/analysis heavily indebted to a 2017 analysis I did on my blog (see references).                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`ukg_eeri`](https://github.com/svmiller/stevedata/blob/master/man/ukg_eeri.Rd)                           | This is a (near) daily data set on the effective exchange rate index for the United Kingdom’s pound sterling from 1990 to 2018. The data are indexed, such that 100 equals the monthly average in January 2005. This is useful for illustrating devaluations of the pound after Black Wednesday, the financial crisis, and, more recently, the UK’s efforts to leave the European Union.                                                                                                                                                                                                                                                                                                   |
| [`uniondensity`](https://github.com/svmiller/stevedata/blob/master/man/uniondensity.Rd)                   | Cross-national data on relative size of the trade unions and predictors in 20 countries. This is a data set of interest to replicating Western and Jackman (1994), who themselves were addressing a debate between Wallerstein and Stephens on which of two highly correlated predictors explains trade union density.                                                                                                                                                                                                                                                                                                                                                                     |
| [`usa_chn_gdp_forecasts`](https://github.com/svmiller/stevedata/blob/master/man/usa_chn_gdp_forecasts.Rd) | This is a toy data set to examine the time in which we should expect China to overtake the United States in total gross domestic product (GDP), given current trends. It includes an OECD long-term GDP forecast from 2014, and forecasts from the forecast and prophet packages in R.                                                                                                                                                                                                                                                                                                                                                                                                     |
| [`usa_computers`](https://github.com/svmiller/stevedata/blob/master/man/usa_computers.Rd)                 | This is a simple and regrettably incomplete time-series on the percentage of U.S. households with access to a computer, by year.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [`usa_migration`](https://github.com/svmiller/stevedata/blob/master/man/usa_migration.Rd)                 | This data set contains counts/estimates for the number of inbound migrants in the U.S as well as outbound migrants of American origin to other countries from 1990 to 2017.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [`usa_states`](https://github.com/svmiller/stevedata/blob/master/man/usa_states.Rd)                       | A simple data set from state.abb, state.name, state.region, and state.division (+ District of Columbia). I’d rather just have all these in one place.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`usa_tradegdp`](https://github.com/svmiller/stevedata/blob/master/man/usa_tradegdp.Rd)                   | A yearly data set on U.S. trade and GDP from 1790 to 2018. Data also include a population variable to facilitate per capita adjustments, if the user sees it useful.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [`wvs_ccodes`](https://github.com/svmiller/stevedata/blob/master/man/wvs_ccodes.Rd)                       | A simple data set that syncs World Values Survey country codes (s003) with corresponding country codes from the Correlates of War state system membership data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [`wvs_immig`](https://github.com/svmiller/stevedata/blob/master/man/wvs_immig.Rd)                         | A data set on attitudes about immigration for all observations in the third to sixth wave of the World Values Survey. I use these data for in-class illustration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`wvs_justifbribe`](https://github.com/svmiller/stevedata/blob/master/man/wvs_justifbribe.Rd)             | A data set on attitudes about the justifiability of bribe-taking for all observations in the third to sixth wave of the World Values Survey. I use these data for in-class illustration about seemingly interval-level, but information-poor measurements.                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`wvs_usa_abortion`](https://github.com/svmiller/stevedata/blob/master/man/wvs_usa_abortion.Rd)           | A data set on attitudes about the justifiability of abortion in the United States based on World Values Survey responses recorded across six waves (from 1982 to 2011). I assembled this data frame probably around 2014 and routinely use it for in-class illustration about regression, post-estimation simulation, quantities of interest, and how to think about modeling a dependent variable that is on a 1-10 scale, but has curious heaping patterns.                                                                                                                                                                                                                              |
| [`yugo_sales`](https://github.com/svmiller/stevedata/blob/master/man/yugo_sales.Rd)                       | A data set on Yugo sales against two competing models in the United States from 1985 to 1992.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

