Skip to content

Instantly share code, notes, and snippets.

View Aaronmoralesshildrick's full-sized avatar

Aaron Morales Shildrick Aaronmoralesshildrick

View GitHub Profile
@diamonaj
diamonaj / CS112_11_1_2.R
Last active November 17, 2019 15:00
Breakout2
# If you are copy/pasting this to an R Notebook, select "Raw" from the GitHub page before you copy.
# Table 1 in Ebonya
# Indep. vars
# anygirls: Any female children
# ngirls: Number of female children
# totchi: Total number of children
# white: White=1, 0 otherwise
# female: Female=1, 0 otherwise
sink("transcript.txt", split = TRUE)
cat(getwd(), "\n")
rm(list=ls())
library(foreign)
foo <- read.csv("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00087718-6996/dw-data.csv")
X = cbind(foo$age, foo$education, foo$black, foo$hispanic, foo$married, foo$nodegree, foo$re75, foo$re74)
PEACEKEEPING WORKOUT (based on King, Gary;Zeng, Langche, 2007,
"Replication data for: When Can History be Our Guide?
The Pitfalls of Counterfactual Inference",
https://hdl.handle.net/1902.1/DXRXCFAWPK,
Harvard Dataverse, V4,
UNF:3:DaYlT6QSX9r0D50ye+tXpA== [fileUNF] )
# CONSIDER USING THE JUPYTER NOTEBOOK WITH R-SERVER KERNEL (NEVER R-SAGE KERNEL)
foo <- read.csv("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00086677-3767/peace.csv")
# extract relevant columns