AER 01

## Loading required package: car
## Loading required package: carData
## Loading required package: lmtest
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## Loading required package: sandwich
## Loading required package: survival
## Registered S3 methods overwritten by 'lme4':
##   method                          from
##   cooks.distance.influence.merMod car 
##   influence.merMod                car 
##   dfbeta.influence.merMod         car 
##   dfbetas.influence.merMod        car
##   district                          school  county grades students teachers
## 1    75119              Sunol Glen Unified Alameda  KK-08      195    10.90
## 2    61499            Manzanita Elementary   Butte  KK-08      240    11.15
## 3    61549     Thermalito Union Elementary   Butte  KK-08     1550    82.90
## 4    61457 Golden Feather Union Elementary   Butte  KK-08      243    14.00
## 5    61523        Palermo Union Elementary   Butte  KK-08     1335    71.50
## 6    62042         Burrel Union Elementary  Fresno  KK-08      137     6.40
##   calworks   lunch computer expenditure    income   english  read  math
## 1   0.5102  2.0408       67    6384.911 22.690001  0.000000 691.6 690.0
## 2  15.4167 47.9167      101    5099.381  9.824000  4.583333 660.5 661.9
## 3  55.0323 76.3226      169    5501.955  8.978000 30.000002 636.3 650.9
## 4  36.4754 77.0492       85    7101.831  8.978000  0.000000 651.9 643.5
## 5  33.1086 78.4270      171    5235.988  9.080333 13.857677 641.8 639.9
## 6  12.3188 86.9565       25    5580.147 10.415000 12.408759 605.7 605.4
##    district            school                  county      grades   
##  Length:420         Length:420         Sonoma     : 29   KK-06: 61  
##  Class :character   Class :character   Kern       : 27   KK-08:359  
##  Mode  :character   Mode  :character   Los Angeles: 27              
##                                        Tulare     : 24              
##                                        San Diego  : 21              
##                                        Santa Clara: 20              
##                                        (Other)    :272              
##     students          teachers          calworks          lunch       
##  Min.   :   81.0   Min.   :   4.85   Min.   : 0.000   Min.   :  0.00  
##  1st Qu.:  379.0   1st Qu.:  19.66   1st Qu.: 4.395   1st Qu.: 23.28  
##  Median :  950.5   Median :  48.56   Median :10.520   Median : 41.75  
##  Mean   : 2628.8   Mean   : 129.07   Mean   :13.246   Mean   : 44.71  
##  3rd Qu.: 3008.0   3rd Qu.: 146.35   3rd Qu.:18.981   3rd Qu.: 66.86  
##  Max.   :27176.0   Max.   :1429.00   Max.   :78.994   Max.   :100.00  
##                                                                       
##     computer       expenditure       income          english      
##  Min.   :   0.0   Min.   :3926   Min.   : 5.335   Min.   : 0.000  
##  1st Qu.:  46.0   1st Qu.:4906   1st Qu.:10.639   1st Qu.: 1.941  
##  Median : 117.5   Median :5215   Median :13.728   Median : 8.778  
##  Mean   : 303.4   Mean   :5312   Mean   :15.317   Mean   :15.768  
##  3rd Qu.: 375.2   3rd Qu.:5601   3rd Qu.:17.629   3rd Qu.:22.970  
##  Max.   :3324.0   Max.   :7712   Max.   :55.328   Max.   :85.540  
##                                                                   
##       read            math      
##  Min.   :604.5   Min.   :605.4  
##  1st Qu.:640.4   1st Qu.:639.4  
##  Median :655.8   Median :652.5  
##  Mean   :655.0   Mean   :653.3  
##  3rd Qu.:668.7   3rd Qu.:665.9  
##  Max.   :704.0   Max.   :709.5  
## 
## 'data.frame':    420 obs. of  14 variables:
##  $ district   : chr  "75119" "61499" "61549" "61457" ...
##  $ school     : chr  "Sunol Glen Unified" "Manzanita Elementary" "Thermalito Union Elementary" "Golden Feather Union Elementary" ...
##  $ county     : Factor w/ 45 levels "Alameda","Butte",..: 1 2 2 2 2 6 29 11 6 25 ...
##  $ grades     : Factor w/ 2 levels "KK-06","KK-08": 2 2 2 2 2 2 2 2 2 1 ...
##  $ students   : num  195 240 1550 243 1335 ...
##  $ teachers   : num  10.9 11.1 82.9 14 71.5 ...
##  $ calworks   : num  0.51 15.42 55.03 36.48 33.11 ...
##  $ lunch      : num  2.04 47.92 76.32 77.05 78.43 ...
##  $ computer   : num  67 101 169 85 171 25 28 66 35 0 ...
##  $ expenditure: num  6385 5099 5502 7102 5236 ...
##  $ income     : num  22.69 9.82 8.98 8.98 9.08 ...
##  $ english    : num  0 4.58 30 0 13.86 ...
##  $ read       : num  692 660 636 652 642 ...
##  $ math       : num  690 662 651 644 640 ...
##                 Estimate Std. Error     t value      Pr(>|t|)
## (Intercept) 683.45305948 9.56214469  71.4748711 3.011667e-218
## stratio      -0.30035544 0.25797023  -1.1643027  2.450536e-01
## english      -0.20550107 0.03765408  -5.4576041  8.871666e-08
## lunch        -0.38684059 0.03700982 -10.4523759  1.427370e-22
## gradesKK-08  -1.91291321 1.35865394  -1.4079474  1.599886e-01
## income        0.71615378 0.09832843   7.2832829  1.986712e-12
## calworks     -0.05273312 0.06154758  -0.8567863  3.921191e-01
##                 Estimate  Std. Error     t value      Pr(>|t|)
## (Intercept) 700.47891593 13.58064436  51.5792106 8.950497e-171
## stratio      -1.13674002  0.53533638  -2.1234126  3.438427e-02
## english      -0.21396934  0.03847833  -5.5607753  5.162571e-08
## lunch        -0.39384225  0.03773637 -10.4366757  1.621794e-22
## gradesKK-08  -1.89227865  1.37791820  -1.3732881  1.704966e-01
## income        0.62487986  0.11199008   5.5797785  4.668490e-08
## calworks     -0.04950501  0.06244410  -0.7927892  4.284101e-01
## No start parameters were given. The linear model read ~ stratio is fitted to derive them.
## The start parameters c((Intercept)=706.449, stratio=-2.621, pi1=19.64, pi2=21.532, theta5=0.5, theta6=1, theta7=0.5, theta8=1) are used for optimization.
##                   Estimate    Std. Error       z-score     Pr(>|z|)
## (Intercept)   6.996014e+02  2.686186e+02  2.604441e+00 9.529597e-03
## stratio      -2.272673e+00  1.367757e+01 -1.661605e-01 8.681108e-01
## pi1          -4.896363e+01  5.526907e-08 -8.859139e+08 0.000000e+00
## pi2           1.963920e+01  9.225351e-02  2.128830e+02 0.000000e+00
## theta5       6.939432e-152 3.354672e-160  2.068587e+08 0.000000e+00
## theta6        3.787512e+02  4.249457e+01  8.912932e+00 1.541524e-17
## theta7       -1.227543e+00  4.885276e+01 -2.512741e-02 9.799653e-01
## Warning: It is recommended to run 1000 or more bootstraps.
##             Point Estimate    Boots SE Lower Boots CI (95%)
## (Intercept)   682.56562449 2.892541893                   NA
## stratio        -0.40322352 0.188960137                   NA
## english        -0.20380742 0.010970833                   NA
## lunch          -0.36426215 0.031529433                   NA
## calworks       -0.07186591 0.003223237                   NA
## gradesKK-08    -0.72045639 0.195490165                   NA
## income          0.78911122 0.040396762                   NA
##             Upper Boots CI (95%)
## (Intercept)                   NA
## stratio                       NA
## english                       NA
## lunch                         NA
## calworks                      NA
## gradesKK-08                   NA
## income                        NA
## Residuals were derived by fitting stratio ~ english + lunch + calworks + income + grades + county.
## The following internal instruments were built: IIV(income), IIV(english).
## Fitting an instrumental variable regression with model read ~ stratio + english + lunch + calworks + income + grades + |english + lunch + calworks + income + grades + county + IIV(income) + IIV(english)    county|english + lunch + calworks + income + grades + county + IIV(income) + IIV(english).
##                 Estimate  Std. Error    t value     Pr(>|t|)
## (Intercept) 662.78791557 27.90173069 23.7543657 2.380436e-76
## stratio       0.71480686  1.31077325  0.5453322 5.858545e-01
## english      -0.19522271  0.04057527 -4.8113717 2.188618e-06
## lunch        -0.37834232  0.03927793 -9.6324402 9.760809e-20
## calworks     -0.05665126  0.06302095 -0.8989273 3.692776e-01
## income        0.82693755  0.17236557  4.7975797 2.335271e-06
## gradesKK-08  -1.93795843  1.38723186 -1.3969968 1.632541e-01
## The following internal instruments were built: IIV(iiv=gp,g=x3,income).
## Fitting an instrumental variable regression with model read ~ stratio + english + lunch + calworks + income + grades + |english + lunch + calworks + income + grades + county + IIV(iiv=gp,g=x3,income)    county|english + lunch + calworks + income + grades + county + IIV(iiv=gp,g=x3,income).
##                 Estimate  Std. Error    t value     Pr(>|t|)
## (Intercept) 703.95605932 56.18284961 12.5297322 2.974075e-30
## stratio      -1.30755252  2.73072188 -0.4788304 6.323429e-01
## english      -0.21569879  0.04726222 -4.5638738 6.848861e-06
## lunch        -0.39527218  0.04409111 -8.9648953 1.576520e-17
## calworks     -0.04884574  0.06367608 -0.7670971 4.435143e-01
## income        0.60623924  0.31312518  1.9360923 5.361980e-02
## gradesKK-08  -1.88806451  1.38805414 -1.3602240 1.745894e-01
## Fitting linear mixed-effects model.
## Detected multilevel model with 2 levels.
## For county (Level 2), 45 groups were found.
##                Estimate Std. Error     z-score     Pr(>|z|)
## (Intercept) 675.8228656 5.58008680 121.1133248 0.000000e+00
## stratio      -0.4956054 0.23922638  -2.0717005 3.829339e-02
## english      -0.2599777 0.03413530  -7.6160948 2.614656e-14
## lunch        -0.3692954 0.03560210 -10.3728537 3.295342e-25
## income        0.6723141 0.08862012   7.5864728 3.287314e-14
## gr08TRUE      2.1590333 1.28167222   1.6845440 9.207658e-02
## calworks     -0.0570633 0.05711701  -0.9990596 3.177658e-01

2020-02-17