This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |