Skip to content

Instantly share code, notes, and snippets.

View viniciusmss's full-sized avatar

Vinícius Miranda viniciusmss

  • Facebook
  • San Francisco
View GitHub Profile
@viniciusmss
viniciusmss / CS112-Assignment 2 Solutions (Spring 2019).R
Last active February 23, 2020 18:40 — forked from tomkreker/CS112-Assignment 2 Solutions (Spring 2019).R
CS112-Assignment 2 Solutions (Spring 2019).R
##############
# QUESTION 1:
# a) replicating figure 9.7 (right panel) from Gelman et. al.
# separating treatment and control data
foo = read.csv("https://tinyurl.com/wlgl63b")
ctrl_units = foo[which(foo$treatment==0),]
trt_units = foo[which(foo$treatment==1),]