Hello I’m Robert Johnson and this is what we were working on in class. Below is the graphs we saw earlier in class that was both voterturn vs income/education.
library(Zelig)
## Loading required package: boot
## Loading required package: MASS
## Loading required package: sandwich
## ZELIG (Versions 4.2-1, built: 2013-09-12)
##
## +----------------------------------------------------------------+
## | Please refer to http://gking.harvard.edu/zelig for full |
## | documentation or help.zelig() for help with commands and |
## | models support by Zelig. |
## | |
## | Zelig project citations: |
## | Kosuke Imai, Gary King, and Olivia Lau. (2009). |
## | ``Zelig: Everyone's Statistical Software,'' |
## | http://gking.harvard.edu/zelig |
## | and |
## | Kosuke Imai, Gary King, and Olivia Lau. (2008). |
## | ``Toward A Common Framework for Statistical Analysis |
## | and Development,'' Journal of Computational and |
## | Graphical Statistics, Vol. 17, No. 4 (December) |
## | pp. 892-913. |
## | |
## | To cite individual Zelig models, please use the citation |
## | format printed with each model run and in the documentation. |
## +----------------------------------------------------------------+
##
##
##
## Attaching package: 'Zelig'
##
## The following object is masked from 'package:utils':
##
## cite
library(DescTools)
##
## Attaching package: 'DescTools'
##
## The following object is masked from 'package:Zelig':
##
## Mode
data(turnout)
str(turnout)
## 'data.frame': 2000 obs. of 5 variables:
## $ race : Factor w/ 2 levels "others","white": 2 2 2 2 2 2 2 2 2 2 ...
## $ age : int 60 51 24 38 25 67 40 56 32 75 ...
## $ educate: num 14 10 12 8 12 12 12 10 12 16 ...
## $ income : num 3.35 1.86 0.63 3.42 2.79 ...
## $ vote : int 1 0 0 1 1 1 0 1 1 1 ...
hist(turnout$educate)
hist(turnout$income)
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.