## 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
## 
## 
## Please cite as: 
## 
##  Hlavac, Marek (2014). stargazer: LaTeX code and ASCII text for well-formatted regression and summary statistics tables.
##  R package version 5.1. http://CRAN.R-project.org/package=stargazer 
## 
## 
## Attaching package: 'DescTools'
## 
## The following object is masked from 'package:Zelig':
## 
##     Mode
## Warning: package 'dplyr' was built under R version 3.1.3
## 
## Attaching package: 'dplyr'
## 
## The following objects are masked from 'package:Zelig':
## 
##     combine, summarize
## 
## The following object is masked from 'package:MASS':
## 
##     select
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## Warning: package 'readstata13' was built under R version 3.1.3

For the purpose of this assignment I am using the General Social Survey (GSS) data. I have started with the abridged version from last semester. I am going to cut it down further to include only the variables I am interested in studying. I am interested in looking at variables related to gun ownership. I am curious to see if age, political views, education, and/or racial attitudes have any relation to gun ownership.

However, because the variable for gun ownership is categorical, I will be looking at the relationship between other variables at first. For this assignment I will be looking to see if age and education are related to income. It may be important to know the relationship between these three variables when looking at how each of them relates to gun ownership.

##  [1] "CASEID"   "WORKBLKS" "RACDIF1"  "RACMAR"   "RACDIF2"  "RACDIF3" 
##  [7] "HELPBLK"  "HELPPOOR" "YEAR"     "SEX"      "AGE"      "RACE"    
## [13] "REALINC"  "REALRINC" "EDUC"     "DEGREE"   "PRESTG80" "PAPRES80"
## [19] "MARITAL"  "DIVORCE"  "CHILDS"   "RELIG"    "WRKSLF"   "UNEMP"   
## [25] "REGION"   "SIZE"     "RACLIVE"  "FEAR"     "GUN"      "POLVIEWS"
## [31] "FECHLD"   "FEFAM"
##  [1] "WORKBLKS" "RACDIF1"  "RACDIF2"  "RACDIF3"  "RACMAR"   "HELPBLK" 
##  [7] "HELPPOOR" "YEAR"     "SEX"      "AGE"      "RACE"     "REALINC" 
## [13] "EDUC"     "DEGREE"   "RELIG"    "UNEMP"    "REGION"   "RACLIVE" 
## [19] "FEAR"     "GUN"      "POLVIEWS"
## 
## <table style="text-align:center"><tr><td colspan="3" style="border-bottom: 1px solid black"></td></tr><tr><td style="text-align:left"></td><td colspan="2"><em>Dependent variable:</em></td></tr>
## <tr><td></td><td colspan="2" style="border-bottom: 1px solid black"></td></tr>
## <tr><td style="text-align:left"></td><td colspan="2">REALINC</td></tr>
## <tr><td style="text-align:left"></td><td>(1)</td><td>(2)</td></tr>
## <tr><td colspan="3" style="border-bottom: 1px solid black"></td></tr><tr><td style="text-align:left">AGE</td><td>-75.426<sup>***</sup></td><td>55.033<sup>***</sup></td></tr>
## <tr><td style="text-align:left"></td><td>(7.517)</td><td>(7.150)</td></tr>
## <tr><td style="text-align:left"></td><td></td><td></td></tr>
## <tr><td style="text-align:left">EDUC</td><td></td><td>3,395.803<sup>***</sup></td></tr>
## <tr><td style="text-align:left"></td><td></td><td>(38.543)</td></tr>
## <tr><td style="text-align:left"></td><td></td><td></td></tr>
## <tr><td style="text-align:left">Constant</td><td>34,779.270<sup>***</sup></td><td>-14,495.930<sup>***</sup></td></tr>
## <tr><td style="text-align:left"></td><td>(361.585)</td><td>(652.597)</td></tr>
## <tr><td style="text-align:left"></td><td></td><td></td></tr>
## <tr><td colspan="3" style="border-bottom: 1px solid black"></td></tr><tr><td style="text-align:left">Observations</td><td>49,386</td><td>49,311</td></tr>
## <tr><td style="text-align:left">R<sup>2</sup></td><td>0.002</td><td>0.138</td></tr>
## <tr><td style="text-align:left">Adjusted R<sup>2</sup></td><td>0.002</td><td>0.138</td></tr>
## <tr><td style="text-align:left">Residual Std. Error</td><td>28,480.760 (df = 49384)</td><td>26,473.610 (df = 49308)</td></tr>
## <tr><td style="text-align:left">F Statistic</td><td>100.675<sup>***</sup> (df = 1; 49384)</td><td>3,938.637<sup>***</sup> (df = 2; 49308)</td></tr>
## <tr><td colspan="3" style="border-bottom: 1px solid black"></td></tr><tr><td style="text-align:left"><em>Note:</em></td><td colspan="2" style="text-align:right"><sup>*</sup>p<0.1; <sup>**</sup>p<0.05; <sup>***</sup>p<0.01</td></tr>
## </table>
## 
## ===========================================================================
##                                       Dependent variable:                  
##                     -------------------------------------------------------
##                                             REALINC                        
##                                (1)                         (2)             
## ---------------------------------------------------------------------------
## AGE                         -75.426***                  55.033***          
##                              (7.517)                     (7.150)           
##                                                                            
## EDUC                                                   3,395.803***        
##                                                          (38.543)          
##                                                                            
## Constant                  34,779.270***               -14,495.930***       
##                             (361.585)                   (652.597)          
##                                                                            
## ---------------------------------------------------------------------------
## Observations                  49,386                      49,311           
## R2                            0.002                       0.138            
## Adjusted R2                   0.002                       0.138            
## Residual Std. Error  28,480.760 (df = 49384)     26,473.610 (df = 49308)   
## F Statistic         100.675*** (df = 1; 49384) 3,938.637*** (df = 2; 49308)
## ===========================================================================
## Note:                                           *p<0.1; **p<0.05; ***p<0.01

These two regressions show a significant relationship between age, education, and income. Regression one shows an inverse relationship in that younger people surveyed had higher income. However, once education is factored into the equation the second regression shows a more typical story. Regression two tells us that education and age have a positive relationship with income; older people with more education have higher income.