Measurement Paper Analyses

load(file='/Users/meganwilliams/Desktop/Research/HANDLS Data/MeasurementData.rdata')
load(file='/Users/meganwilliams/Desktop/Research/HANDLS Data/MeasurementData1.rdata')

Model 1 (No Interactions)

Model1.1 = lm(MCLcountry~Age0 + Race + Sex + Educ + Employment01 + acasiincomx01 + Neighborhood02 + CES + sHealth, MeasurementData1,x=T)

summary(Model1.1)
## 
## Call:
## lm(formula = MCLcountry ~ Age0 + Race + Sex + Educ + Employment01 + 
##     acasiincomx01 + Neighborhood02 + CES + sHealth, data = MeasurementData1, 
##     x = T)
## 
## Residuals:
## MCL: SES Standing in country 
##    Min     1Q Median     3Q    Max 
## -5.140 -1.178 -0.158  1.560  6.297 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)
## (Intercept)     4.97866    0.40125   12.41  < 2e-16
## Age0            0.00524    0.00453    1.16  0.24737
## Race1          -0.32980    0.08452   -3.90  9.8e-05
## Sex1           -0.00117    0.08281   -0.01  0.98876
## Educ            0.07142    0.01509    4.73  2.4e-06
## Employment011   0.13360    0.09489    1.41  0.15932
## acasiincomx01  -0.31395    0.09601   -3.27  0.00109
## Neighborhood02 -0.12898    0.04006   -3.22  0.00131
## CES            -0.03618    0.00397   -9.12  < 2e-16
## sHealthLow     -0.44790    0.11944   -3.75  0.00018
## sHealthMiddle  -0.42484    0.09661   -4.40  1.2e-05
## 
## Residual standard error: 1.86 on 2066 degrees of freedom
## Multiple R-squared:  0.142,  Adjusted R-squared:  0.138 
## F-statistic: 34.1 on 10 and 2066 DF,  p-value: <2e-16

Model 2 (Three-Way Interactions)

Model2.1 = lm(MCLcountry~Age0 + Race + Sex + Educ + Employment01 + acasiincomx01 + Neighborhood02 + CES + sHealth + Race*Sex*Employment01 + Race*Employment01 + Sex*Employment01 + Race*Sex*Educ + Race*Educ + Sex*Educ + Race*Sex*acasiincomx01 + Race*acasiincomx01 + Sex*acasiincomx01 + Race*Sex*Neighborhood02 + Race*Neighborhood02 + Sex*Neighborhood02 + Race*Sex*CES + Race*CES + Sex*CES + Race*Sex + Race*Sex*sHealth + Race*sHealth + Sex*sHealth, MeasurementData1,x=T)

summary(Model2.1)
## 
## Call:
## lm(formula = MCLcountry ~ Age0 + Race + Sex + Educ + Employment01 + 
##     acasiincomx01 + Neighborhood02 + CES + sHealth + Race * Sex * 
##     Employment01 + Race * Employment01 + Sex * Employment01 + 
##     Race * Sex * Educ + Race * Educ + Sex * Educ + Race * Sex * 
##     acasiincomx01 + Race * acasiincomx01 + Sex * acasiincomx01 + 
##     Race * Sex * Neighborhood02 + Race * Neighborhood02 + Sex * 
##     Neighborhood02 + Race * Sex * CES + Race * CES + Sex * CES + 
##     Race * Sex + Race * Sex * sHealth + Race * sHealth + Sex * 
##     sHealth, data = MeasurementData1, x = T)
## 
## Residuals:
## MCL: SES Standing in country 
##    Min     1Q Median     3Q    Max 
## -5.413 -1.424 -0.649  1.316  6.773 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)
## (Intercept)                5.565137   0.649412    8.57  < 2e-16
## Age0                       0.006380   0.004523    1.41   0.1586
## Race1                     -0.858885   0.873598   -0.98   0.3256
## Sex1                      -0.670226   0.893407   -0.75   0.4532
## Educ                       0.017642   0.030588    0.58   0.5642
## Employment011             -0.233139   0.161373   -1.44   0.1487
## acasiincomx01             -0.314342   0.165193   -1.90   0.0572
## Neighborhood02            -0.016810   0.072750   -0.23   0.8173
## CES                       -0.040562   0.006568   -6.18  7.9e-10
## sHealthLow                -0.352570   0.197977   -1.78   0.0751
## sHealthMiddle             -0.481895   0.169186   -2.85   0.0044
## Race1:Sex1                -0.168538   1.293572   -0.13   0.8964
## Race1:Employment011        0.244699   0.250796    0.98   0.3293
## Sex1:Employment011         0.453590   0.242360    1.87   0.0614
## Race1:Educ                 0.055437   0.041707    1.33   0.1839
## Sex1:Educ                  0.038522   0.046257    0.83   0.4051
## Race1:acasiincomx01        0.020166   0.257829    0.08   0.9377
## Sex1:acasiincomx01        -0.014352   0.247607   -0.06   0.9538
## Race1:Neighborhood02      -0.160644   0.105584   -1.52   0.1283
## Sex1:Neighborhood02       -0.115465   0.109504   -1.05   0.2918
## Race1:CES                  0.000757   0.009947    0.08   0.9393
## Sex1:CES                   0.016829   0.010856    1.55   0.1213
## Race1:sHealthLow          -0.283742   0.322573   -0.88   0.3792
## Race1:sHealthMiddle        0.209928   0.262201    0.80   0.4234
## Sex1:sHealthLow           -0.264385   0.308139   -0.86   0.3910
## Sex1:sHealthMiddle        -0.047221   0.252276   -0.19   0.8515
## Race1:Sex1:Employment011   0.396372   0.393441    1.01   0.3138
## Race1:Sex1:Educ            0.001965   0.061664    0.03   0.9746
## Race1:Sex1:acasiincomx01  -0.170436   0.400744   -0.43   0.6707
## Race1:Sex1:Neighborhood02  0.114077   0.162548    0.70   0.4829
## Race1:Sex1:CES            -0.011883   0.016638   -0.71   0.4752
## Race1:Sex1:sHealthLow      0.823827   0.490850    1.68   0.0934
## Race1:Sex1:sHealthMiddle   0.146064   0.395698    0.37   0.7121
## 
## Residual standard error: 1.84 on 2044 degrees of freedom
## Multiple R-squared:  0.162,  Adjusted R-squared:  0.149 
## F-statistic: 12.4 on 32 and 2044 DF,  p-value: <2e-16

Model 2 (Two-Way Interactions)

Model2.2 = lm(MCLcountry~Age0 + Race + Sex + Educ + Employment01 + acasiincomx01 + Neighborhood02 + CES + Race * Educ + Race * Employment01 + Race * acasiincomx01 + Race * Neighborhood02 + Race * CES + Race*sHealth + Sex * Educ + Sex * Employment01 + Sex * acasiincomx01 + Sex * Neighborhood02 + Sex * CES + Sex*sHealth + Race * Sex, MeasurementData1, x=T)

summary(Model2.2)
## 
## Call:
## lm(formula = MCLcountry ~ Age0 + Race + Sex + Educ + Employment01 + 
##     acasiincomx01 + Neighborhood02 + CES + Race * Educ + Race * 
##     Employment01 + Race * acasiincomx01 + Race * Neighborhood02 + 
##     Race * CES + Race * sHealth + Sex * Educ + Sex * Employment01 + 
##     Sex * acasiincomx01 + Sex * Neighborhood02 + Sex * CES + 
##     Sex * sHealth + Race * Sex, data = MeasurementData1, x = T)
## 
## Residuals:
## MCL: SES Standing in country 
##    Min     1Q Median     3Q    Max 
## -5.310 -1.138 -0.636  1.170  6.808 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)
## (Intercept)           5.667816   0.580837    9.76  < 2e-16
## Age0                  0.006125   0.004508    1.36   0.1744
## Race1                -1.060060   0.650633   -1.63   0.1034
## Sex1                 -0.837575   0.647246   -1.29   0.1958
## Educ                  0.016552   0.026438    0.63   0.5313
## Employment011        -0.290292   0.146822   -1.98   0.0482
## acasiincomx01        -0.290572   0.150100   -1.94   0.0530
## Neighborhood02       -0.037581   0.065004   -0.58   0.5632
## CES                  -0.039034   0.006025   -6.48  1.2e-10
## sHealthLow           -0.470297   0.181062   -2.60   0.0095
## sHealthMiddle        -0.497687   0.152459   -3.26   0.0011
## Race1:Educ            0.058689   0.030654    1.91   0.0557
## Race1:Employment011   0.401558   0.192529    2.09   0.0371
## Race1:acasiincomx01  -0.055197   0.196607   -0.28   0.7789
## Race1:Neighborhood02 -0.117662   0.079968   -1.47   0.1413
## Race1:CES            -0.003719   0.007946   -0.47   0.6398
## Race1:sHealthLow      0.057775   0.242453    0.24   0.8117
## Race1:sHealthMiddle   0.267438   0.195653    1.37   0.1718
## Sex1:Educ             0.037076   0.030244    1.23   0.2204
## Sex1:Employment011    0.596623   0.190658    3.13   0.0018
## Sex1:acasiincomx01   -0.077974   0.194046   -0.40   0.6878
## Sex1:Neighborhood02  -0.062600   0.080614   -0.78   0.4375
## Sex1:CES              0.012379   0.008199    1.51   0.1313
## Sex1:sHealthLow       0.047624   0.238837    0.20   0.8420
## Sex1:sHealthMiddle    0.000622   0.193555    0.00   0.9974
## Race1:Sex1            0.314666   0.171512    1.83   0.0667
## 
## Residual standard error: 1.84 on 2051 degrees of freedom
## Multiple R-squared:  0.16,   Adjusted R-squared:  0.15 
## F-statistic: 15.7 on 25 and 2051 DF,  p-value: <2e-16

Model 2 (Only Significant Interactions)

FINAL MODEL

Model2.3 = lm(MCLcountry~Age0 + Race + Sex + Educ + Employment01 + acasiincomx01 + Neighborhood02 + CES + Race * Educ + Race * Employment01 + Sex * Employment01 , MeasurementData1,x=T)

summary(Model2.3)
## 
## Call:
## lm(formula = MCLcountry ~ Age0 + Race + Sex + Educ + Employment01 + 
##     acasiincomx01 + Neighborhood02 + CES + Race * Educ + Race * 
##     Employment01 + Sex * Employment01, data = MeasurementData1, 
##     x = T)
## 
## Residuals:
## MCL: SES Standing in country 
##    Min     1Q Median     3Q    Max 
## -5.331 -1.529 -0.438  1.408  6.786 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)          5.67638    0.44386   12.79  < 2e-16
## Age0                 0.00398    0.00448    0.89  0.37444
## Race1               -1.61200    0.36084   -4.47  8.3e-06
## Sex1                -0.41459    0.12973   -3.20  0.00142
## Educ                 0.02800    0.02246    1.25  0.21268
## Employment011       -0.31011    0.13651   -2.27  0.02320
## acasiincomx01       -0.33941    0.09571   -3.55  0.00040
## Neighborhood02      -0.14314    0.03964   -3.61  0.00031
## CES                 -0.03965    0.00387  -10.25  < 2e-16
## Race1:Educ           0.07804    0.02876    2.71  0.00671
## Race1:Employment011  0.49787    0.17430    2.86  0.00433
## Sex1:Employment011   0.67174    0.16805    4.00  6.6e-05
## 
## Residual standard error: 1.85 on 2065 degrees of freedom
## Multiple R-squared:  0.147,  Adjusted R-squared:  0.142 
## F-statistic: 32.4 on 11 and 2065 DF,  p-value: <2e-16

Model 2 Interaction Plots

library(effects)
## Loading required package: colorspace
## 
## Attaching package: 'effects'
## 
## The following object is masked from 'package:car':
## 
##     Prestige
plot(effect("Sex:Employment01", Model2.3, list(wt=c(2.2,3.2,4.2))), multiline=TRUE)

plot of chunk unnamed-chunk-5

plot(effect("Race:Employment01", Model2.3, list(wt=c(2.2,3.2,4.2))), multiline=TRUE)

plot of chunk unnamed-chunk-5

plot(effect("Race:Educ", Model2.3, list(wt=c(2.2,3.2,4.2))), multiline=TRUE)

plot of chunk unnamed-chunk-5