Packages of Example Data for The Effect

Overview

causaldata

This repository will contain R, Stata, and Python packages, all called causaldata, which contain data sets that can be used to implement the code examples in causal inference textbooks.

As of the moment, this contains data sets from The Effect by Huntington-Klein. Data sets from Causal Inference: The Mixtape by Scott Cunningham are currently being added.

Data sets all come with documentation in the form of variable labels, although the exact format of this varies from language to language.

The R package can be installed with:

# If necessary: install.packages('remotes')
remotes::install_github('NickCH-K/causaldata/R/')

The Stata package can be installed with:

net install causaldata, from("https://raw.githubusercontent.com/NickCH-K/causaldata/master/Stata/")

To install the Python package, use the green Code button on this page to download this repository, unzip it, change the directory to the causaldata/Python folder, and install with:

python setup.py install

Or, if you're using something with IPython like Spyder, you might use

runfile('the/full/path/to/causaldata/Python/setup.py', wdir='your/working/directory',args='install')
You might also like...
Canim1 - Simple python tool to search for packages without m1 wheels in poetry lockfiles

canim1 Usage Clone the repo. Run poetry install. Then you can use the tool: ❯ po

Pacman - A suite of tools for manipulating debian packages

Overview Repository is a suite of tools for manipulating debian packages. At a h

A tool to nowcast quarterly data with monthly indicators: US consumption example

MIDAS_Nowcaster A tool to nowcast quarterly data with monthly indicators: US consumption example Pulls data directly from FRED from a list of codes -

Example python package with pybind11 cpp extension

Developing C++ extension in Python using pybind11 This is a summary of the commands used in the tutorial.

An example using debezium and mysql with docker-compose

debezium-mysql An example using debezium and mysql with docker-compose The docker compose starts the Zookeeper, Kafka, Mysql and Debezium Connect. Aft

This is an example manipulation package of for a robot manipulator based on Drake with ROS2.

This is an example manipulation package of for a robot manipulator based on Drake with ROS2.

BOHB tune library template (included example)
BOHB tune library template (included example)

BOHB-template 실행 방법 python main.py 2021-10-10 기준 tf keras 버전 (tunecallback 방식) 완료 tf gradienttape 버전 (train_iteration 방식) 완료 pytorch 버전은 구현 준비중 방법 소개

Assembly example for CadQuery
Assembly example for CadQuery

Spindle and vacuum attachment This is a model of the vacuum attachment for my Workbee CNC router. There is a mist spray coming from the left hand side

An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

Comments
  • Missing columns

    Missing columns

    I ran into trouble trying to replicate some of the DiD examples in Scott's book using the abortion dataset. Looks like the causaldata version is missing some columns.

    abortion_orig = haven::read_dta("https://raw.github.com/scunning1975/mixtape/master/abortion.dta") 
    data("abortion", package = "causaldata")
    
    setdiff(names(abortion_orig), names(abortion))
    #>  [1] "totcase"    "rate"       "totrate"    "id"         "black"     
    #>  [6] "perc1519"   "perc"       "aids"       "aidscapita" "ac"        
    #> [11] "trend"      "tsq"        "blk"        "female"     "t"         
    #> [16] "wm15"       "wf15"       "bm15"
    

    Created on 2021-11-15 by the reprex package (v2.0.1)

    opened by grantmcdermott 4
  • Warnings in `titanic` and `castle` documentation

    Warnings in `titanic` and `castle` documentation

    I believe the titanic and castle datasets are documented incorrectly in the R package. Per R CMD Check:

      Data codoc mismatches from documentation object 'castle':
      Variables in data frame 'castle'
        Code: assault blackm_15_24 blackm_25_44 burglary homicide jhcitizen_c
              jhpolice_c l_exp_pubwelfare l_exp_subsidy l_homicide l_income
              l_lagprisoner l_larceny l_motor l_police l_prisoner lag0 lag1
              lag2 lag3 lag4 lag5 larceny lead1 lead2 lead3 lead4 lead5 lead6
              lead7 lead8 lead9 motor murder popwt poverty r20001 r20002
              r20003 r20004 r20011 r20012 r20013 r20014 r20021 r20022 r20023
              r20024 r20031 r20032 r20033 r20034 r20041 r20042 r20043 r20044
              r20051 r20052 r20053 r20054 r20061 r20062 r20063 r20064 r20071
              r20072 r20073 r20074 r20081 r20082 r20083 r20084 r20091 r20092
              r20093 r20094 r20101 r20102 r20103 r20104 robbery robbery_gun_r
              sid trend_1 trend_10 trend_11 trend_12 trend_13 trend_14
              trend_15 trend_16 trend_17 trend_18 trend_19 trend_2 trend_20
              trend_21 trend_22 trend_23 trend_24 trend_25 trend_26 trend_27
              trend_28 trend_29 trend_3 trend_30 trend_31 trend_32 trend_33
              trend_34 trend_35 trend_36 trend_37 trend_38 trend_39 trend_4
              trend_40 trend_41 trend_42 trend_43 trend_44 trend_45 trend_46
              trend_47 trend_48 trend_49 trend_5 trend_50 trend_51 trend_6
              trend_7 trend_8 trend_9 unemployrt whitem_15_24 whitem_25_44
              year
        Docs: assault blackm_15_24 blackm_25_44 burglary homicide jhcitizen_c
              jhpolice_c l_exp_pubwelfare l_exp_subsidy l_homicide l_income
              l_lagprisoner l_larceny l_motor l_police l_prisoner larceny
              lead1-lag5 motor murder popwt poverty r20001-r20104 robbery
              robbery_gun_r sid trend_1-trend_51 unemployrt whitem_15_24
              whitem_25_44 year
      
      Data codoc mismatches from documentation object 'titanic':
      Variables in data frame 'titanic'
        Code: age class sex survived
        Docs: age any distvct got hiv2004 tinc villnum
    
    opened by malcolmbarrett 2
  • Add Causal Inference by H&R data

    Add Causal Inference by H&R data

    This PR does a few things:

    • Adds the Causal Inference: What If? data + documentation
    • Fixes the tibble import (these were already tibbles, as are yours, but for that to work generally, you need to import tibble + use @importFrom.
    • Adds me as an author

    This PR only modifies the R package! I don't know how the python or Stata setups work, so it's probably more efficient for you to make the corresponding changes

    opened by malcolmbarrett 1
Owner
Economics professor at Seattle University (previously CSU Fullerton). Econometrics, causality, and visualization. Usually R, sometimes Stata or Python.
null
Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

shironeko(Hazel) 4 Jan 1, 2022
A Blender addon for VSE that auto-adjusts video strip's length, if speed effect is applied.

Blender VSE Speed Adjust Addon When using Video Sequence Editor in Blender, the speed effect strip doesn't auto-adjusts clip length when changing its

Arpit Srivastava 2 Jan 18, 2022
This is a method to build your own qgis configuration packages using osgeo4W.

This is a method to build your own qgis configuration packages using osgeo4W. Then you can automate deployment in your organization with a controled and trusted environnement.

Régis Haubourg 26 Dec 5, 2022
An AI-powered device to stop people from stealing my packages.

Package Theft Prevention Device An AI-powered device to stop people from stealing my packages. Installation To install on a raspberry pi, clone the re

rydercalmdown 157 Nov 24, 2022
Automatically give thanks to Pypi packages you use in your project!

Automatically give thanks to Pypi packages you use in your project!

Ward 25 Dec 20, 2021
🗽 Like yarn outdated/upgrade, but for pip. Upgrade all your pip packages and automate your Python Dependency Management.

pipupgrade The missing command for pip Table of Contents Features Quick Start Usage Basic Usage Docker Environment Variables FAQ License Features Upda

Achilles Rasquinha 529 Dec 31, 2022
PyScaffold is a project generator for bootstrapping high quality Python packages

PyScaffold is a project generator for bootstrapping high quality Python packages, ready to be shared on PyPI and installable via pip. It is easy to use and encourages the adoption of the best tools and practices of the Python ecosystem, helping you and your team to stay sane, happy and productive. The best part? It is stable and has been used by thousands of developers for over half a decade!

PyScaffold 1.7k Jan 3, 2023
A Python Perforce package that doesn't bring in any other packages to work.

P4CMD ?? A Python Perforce package that doesn't bring in any other packages to work. Relies on p4cli installed on the system. p4cmd The p4cmd module h

Niels Vaes 13 Dec 19, 2022
Open source book about making Python packages.

Python packages Tomas Beuzen & Tiffany Timbers Python packages are a core element of the Python programming language and are how you create organized,

Python Packages 169 Jan 6, 2023
It is convenient to quickly import Python packages from the network.

It is convenient to quickly import Python packages from the network.

zmaplex 1 Jan 18, 2022