Package: causaldata 0.1.4

Nick Huntington-Klein

causaldata: Example Data Sets for Causal Inference Textbooks

Example data sets to run the example problems from causal inference textbooks. Currently, contains data sets for Huntington-Klein, Nick (2021 and 2025) "The Effect" <https://theeffectbook.net>, first and second edition, Cunningham, Scott (2021 and 2025, ISBN-13: 978-0-300-25168-5) "Causal Inference: The Mixtape", and Hernán, Miguel and James Robins (2020) "Causal Inference: What If" <https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/>.

Authors:Nick Huntington-Klein [aut, cre], Malcolm Barrett [aut]

causaldata_0.1.4.tar.gz
causaldata_0.1.4.tar.gz(r-4.5-noble)causaldata_0.1.4.tar.gz(r-4.4-noble)
causaldata_0.1.4.tgz(r-4.4-emscripten)causaldata_0.1.4.tgz(r-4.3-emscripten)
causaldata.pdf |causaldata.html
causaldata/json (API)
NEWS

# Install 'causaldata' in R:
install.packages('causaldata', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nickch-k/causaldata/issues

Datasets:
  • Mroz - U.S. Women's Labor-Force Participation
  • abortion - Data on abortion legalization and sexually transmitted infections
  • adult_services - Data from a survey of internet-mediated sex workers
  • auto - Automobile data from Stata
  • avocado - Data on avocado sales
  • black_politicians - Data from "Black Politicians are More Intrinsically Motivated to Advance Blacks' Interests"
  • castle - Data on castle-doctrine statutes and violent crime
  • ccdrug - Data on Drug Arrests from the Crown Court Sentencing Survey
  • close_college - Data from Card (1995) to estimate the effect of college education on earnings
  • close_elections_lmb - A close-elections regression discontinuity study from Lee, Moretti, and Butler
  • cps_mixtape - Observational counterpart to nsw_mixtape data
  • credit_cards - Data on Taiwanese Credit Card Holders
  • gapminder - Gapminder data
  • google_stock - Google Stock Data
  • gov_transfers - Data from "Government Transfers and Political Support"
  • gov_transfers_density - Data from "Government Transfers and Political Support" for Density Tests
  • greek_data - Data from a fictional randomized heart transplant study
  • mortgages - Data from "How do Mortgage Subsidies Affect Home Ownership? Evidence from the Mid-Century GI Bills"
  • nhefs - National Health and Nutrition Examination Survey Data I Epidemiologic Follow-up Study
  • nhefs_codebook - NHEFS Codebook
  • nhefs_complete - Complete-Data National Health and Nutrition Examination Survey Data I Epidemiologic Follow-up Study
  • nsw_mixtape - Data from the National Supported Work Demonstration (NSW) job-training program
  • organ_donations - Organ Donation Data
  • restaurant_inspections - Data on Restaurant Inspections
  • ri - A simple simulated data set for calculating p-values
  • scorecard - Earnings and Loan Repayment in US Four-Year Colleges
  • snow - Data from John Snow's 1855 study of the cause of cholera
  • social_insure - Data from "Social Networks and the Decision to Insure"
  • texas - Data on prison capacity expansion in Texas
  • thornton_hiv - Data from HIV information experiment in Thornton
  • titanic - Data from the sinking of the Titanic
  • training_bias_reduction - Simulated data from a job training program for a bias reduction method
  • training_example - Simulated data from a job training program
  • yule - Data on 19th century English Poverty from Yule

3.62 score 1 packages 145 scripts 1.9k downloads 0 exports 11 dependencies

Last updated 5 days agofrom:6d25e70297. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 25 2024
R-4.5-linuxOKOct 25 2024

Exports:

Dependencies:clifansigluelifecyclemagrittrpillarpkgconfigrlangtibbleutf8vctrs

Readme and manuals

Help Manual

Help pageTopics
Data on abortion legalization and sexually transmitted infectionsabortion
Data from a survey of internet-mediated sex workersadult_services
Automobile data from Stataauto
Data on avocado salesavocado
Data from "Black Politicians are More Intrinsically Motivated to Advance Blacks' Interests"black_politicians
Data on castle-doctrine statutes and violent crimecastle
Data on Drug Arrests from the Crown Court Sentencing Surveyccdrug
Data from Card (1995) to estimate the effect of college education on earningsclose_college
A close-elections regression discontinuity study from Lee, Moretti, and Butler (2004)close_elections_lmb
Observational counterpart to nsw_mixtape datacps_mixtape
Data on Taiwanese Credit Card Holderscredit_cards
Gapminder datagapminder
Google Stock Datagoogle_stock
Data from "Government Transfers and Political Support"gov_transfers
Data from "Government Transfers and Political Support" for Density Testsgov_transfers_density
Data from a fictional randomized heart transplant studygreek_data
Data from "How do Mortgage Subsidies Affect Home Ownership? Evidence from the Mid-Century GI Bills"mortgages
U.S. Women's Labor-Force ParticipationMroz
National Health and Nutrition Examination Survey Data I Epidemiologic Follow-up Studynhefs
NHEFS Codebooknhefs_codebook
Complete-Data National Health and Nutrition Examination Survey Data I Epidemiologic Follow-up Studynhefs_complete
Data from the National Supported Work Demonstration (NSW) job-training programnsw_mixtape
Organ Donation Dataorgan_donations
Data on Restaurant Inspectionsrestaurant_inspections
A simple simulated data set for calculating p-valuesri
Earnings and Loan Repayment in US Four-Year Collegesscorecard
Data from John Snow's 1855 study of the cause of cholerasnow
Data from "Social Networks and the Decision to Insure"social_insure
Data on prison capacity expansion in Texastexas
Data from HIV information experiment in Thornton (2008)thornton_hiv
Data from the sinking of the Titanictitanic
Simulated data from a job training program for a bias reduction methodtraining_bias_reduction
Simulated data from a job training programtraining_example
Data on 19th century English Poverty from Yule (1899)yule