Loading Packages
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4
## ✓ tibble 3.0.6 ✓ dplyr 1.0.4
## ✓ tidyr 1.1.2 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## Linking to GEOS 3.7.2, GDAL 2.4.2, PROJ 5.2.0
## To enable
## caching of data, set `options(tigris_use_cache = TRUE)` in your R script or .Rprofile.
## Registered S3 method overwritten by 'geojsonlint':
## method from
## print.location dplyr
## Loading required package: spData
## To access larger datasets in this package, install the spDataLarge
## package with: `install.packages('spDataLarge',
## repos='https://nowosad.github.io/drat/', type='source')`
## Loading required package: spatstat.data
## Loading required package: nlme
##
## Attaching package: 'nlme'
## The following object is masked from 'package:dplyr':
##
## collapse
## Loading required package: rpart
## Registered S3 method overwritten by 'spatstat':
## method from
## print.boxx cli
##
## spatstat 1.64-1 (nickname: 'Help you I can, yes!')
## For an introduction to spatstat, type 'beginner'
##
## Note: R version 3.6.2 (2019-12-12) is more than a year old; we strongly recommend upgrading to the latest version
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
## Loading required package: lattice
##
## Attaching package: 'lattice'
## The following object is masked from 'package:spatstat':
##
## panel.histogram
## Loading required package: survival
## Loading required package: Formula
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
##
## Attaching package: 'MASS'
## The following object is masked from 'package:spatstat':
##
## area
## The following object is masked from 'package:dplyr':
##
## select
## Loading required package: colorspace
##
## Attaching package: 'colorspace'
## The following object is masked from 'package:spatstat':
##
## coords
## Loading required package: grid
## Loading required package: data.table
##
## Attaching package: 'data.table'
## The following object is masked from 'package:spatstat':
##
## shift
## The following objects are masked from 'package:dplyr':
##
## between, first, last
## The following object is masked from 'package:purrr':
##
## transpose
## VIM is ready to use.
## Since version 4.0.0 the GUI is in its own package VIMGUI.
##
## Please use the package to use the new (and old) GUI.
## Suggestions and bug-reports can be submitted at: https://github.com/alexkowa/VIM/issues
##
## Attaching package: 'VIM'
## The following object is masked from 'package:datasets':
##
## sleep
##
## Attaching package: 'olsrr'
## The following object is masked from 'package:MASS':
##
## cement
## The following object is masked from 'package:datasets':
##
## rivers
## Registered S3 methods overwritten by 'lme4':
## method from
## cooks.distance.influence.merMod car
## influence.merMod car
## dfbeta.influence.merMod car
## dfbetas.influence.merMod car
## Install package "strengejacke" from GitHub (`devtools::install_github("strengejacke/strengejacke")`) to load all sj-packages at once!
## To install your API key for use in future sessions, run this function with `install = TRUE`.
Preliminary Analysis: Importing San Diego City Police Report Data
Preliminary Analysis: Pulling up my Police Data (excluding community characteristic variables)
## Reading layer `SD.city.tracts' from data source `/Users/sherigudez/Documents/Honor's Thesis/R Code/SD.city.tracts.shp' using driver `ESRI Shapefile'
## Simple feature collection with 291 features and 32 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -117.2822 ymin: 32.53471 xmax: -116.9057 ymax: 33.11418
## proj4string: +proj=longlat +ellps=GRS80 +no_defs
## List of 2
## $ :Classes 'sf' and 'data.frame': 291 obs. of 33 variables:
## ..$ GEOID : chr [1:291] "06073000100" "06073000201" "06073000202" "06073000300" ...
## ..$ tpop : num [1:291] 3250 1915 4583 5094 3758 ...
## ..$ tpopr : num [1:291] 3250 1915 4583 5094 3758 ...
## ..$ medincome: num [1:291] 138864 90673 66438 69028 75559 ...
## ..$ pfpov : num [1:291] 0 0.992 0.676 0.942 0 ...
## ..$ powner : num [1:291] 36.8 24.9 18.9 13.4 11.1 ...
## ..$ phsgrad : num [1:291] 1.97 3.34 4.49 3.95 5.27 ...
## ..$ pbach : num [1:291] 40.9 41.4 43.4 45.8 40.9 ...
## ..$ pdiv : num [1:291] 7.32 12.58 12 13.17 11.36 ...
## ..$ psingm : num [1:291] 0.215 2.245 2.487 2.042 3.167 ...
## ..$ pnhwhite : num [1:291] 76.7 84.4 71.6 72.5 61.8 ...
## ..$ nhwhite : num [1:291] 2492 1616 3282 3693 2321 ...
## ..$ pnhasn : num [1:291] 4.37 2.14 9.38 2.18 11.04 ...
## ..$ nhasn : num [1:291] 142 41 430 111 415 101 161 335 244 528 ...
## ..$ pnhblk : num [1:291] 0 0.522 0.873 5.104 5.003 ...
## ..$ nhblk : num [1:291] 0 10 40 260 188 51 252 73 490 660 ...
## ..$ phisp : num [1:291] 15.88 7.05 13.86 16.2 19.43 ...
## ..$ hisp : num [1:291] 516 135 635 825 730 ...
## ..$ pnonwhite: num [1:291] 23.3 15.6 28.4 27.5 38.2 ...
## ..$ nonwhite : num [1:291] 758 299 1301 1401 1437 ...
## ..$ pfborn : num [1:291] 13.38 6.37 15.78 9.19 18.12 ...
## ..$ nfborn : num [1:291] 435 122 723 468 681 ...
## ..$ poth : num [1:291] 3.08 5.9 4.28 4.02 2.77 ...
## ..$ oth : num [1:291] 100 113 196 205 104 73 220 295 88 184 ...
## ..$ nhwhitec : num [1:291] 646438 646438 646438 646438 646438 ...
## ..$ nonwhitec: num [1:291] 853300 853300 853300 853300 853300 ...
## ..$ nhasnc : num [1:291] 248715 248715 248715 248715 248715 ...
## ..$ nhblkc : num [1:291] 89133 89133 89133 89133 89133 ...
## ..$ othc : num [1:291] 67268 67268 67268 67268 67268 ...
## ..$ hispc : num [1:291] 448184 448184 448184 448184 448184 ...
## ..$ tpoprc : num [1:291] 1499738 1499738 1499738 1499738 1499738 ...
## ..$ ent : num [1:291] 0.74 0.607 0.911 0.893 1.108 ...
## ..$ geometry :sfc_MULTIPOLYGON of length 291; first list element: List of 1
## .. ..$ :List of 1
## .. ..- attr(*, "class")= chr [1:3] "XY" "MULTIPOLYGON" "sfg"
## ..- attr(*, "sf_column")= chr "geometry"
## ..- attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA NA NA NA NA NA NA ...
## .. ..- attr(*, "names")= chr [1:32] "GEOID" "tpop" "tpopr" "medincome" ...
## $ : spec_tbl_df [305 × 7] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## ..$ GEOID : chr [1:305] "06073000100" "06073000201" "06073000202" "06073000300" ...
## ..$ pcharge : num [1:305] 33 27 55 163 264 50 154 116 50 110 ...
## ..$ p15_29 : num [1:305] 10 11.2 22.2 23.3 28.1 ...
## ..$ resource : num [1:305] 138901 90698 66457 69041 75570 ...
## ..$ resource_pblk: num [1:305] 138901 90698 66458 69047 75575 ...
## ..$ log_tpop : num [1:305] 3.51 3.28 3.66 3.71 3.57 ...
## ..$ log_mincome : num [1:305] 5.14 4.96 4.82 4.84 4.88 ...
## ..- attr(*, "spec")=
## .. .. cols(
## .. .. GEOID = col_character(),
## .. .. pcharge = col_double(),
## .. .. p15_29 = col_double(),
## .. .. resource = col_double(),
## .. .. resource_pblk = col_double(),
## .. .. log_tpop = col_double(),
## .. .. log_mincome = col_double()
## .. .. )
Preliminary Analysis: Merging Police Data with Census Data
## Simple feature collection with 5 features and 38 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -117.1949 ymin: 32.73966 xmax: -117.1554 ymax: 32.75932
## proj4string: +proj=longlat +ellps=GRS80 +no_defs
## GEOID tpop tpopr medincome pfpov powner phsgrad pbach
## 1 06073000100 3250 3250 138864 0.0000000 36.83077 1.969231 40.86154
## 2 06073000201 1915 1915 90673 0.9921671 24.90862 3.342037 41.35770
## 3 06073000202 4583 4583 66438 0.6764128 18.93956 4.494872 43.42134
## 4 06073000300 5094 5094 69028 0.9422850 13.42756 3.945819 45.75972
## 5 06073000400 3758 3758 75559 0.0000000 11.09633 5.268760 40.89941
## pdiv psingm pnhwhite nhwhite pnhasn nhasn pnhblk nhblk
## 1 7.323077 0.2153846 76.67692 2492 4.369231 142 0.0000000 0
## 2 12.584856 2.2454308 84.38642 1616 2.140992 41 0.5221932 10
## 3 12.000873 2.4874536 71.61248 3282 9.382501 430 0.8727907 40
## 4 13.172360 2.0416176 72.49706 3693 2.179034 111 5.1040440 260
## 5 11.362427 3.1665780 61.76158 2321 11.043108 415 5.0026610 188
## phisp hisp pnonwhite nonwhite pfborn nfborn poth oth nhwhitec
## 1 15.876923 516 23.32308 758 13.384615 435 3.076923 100 646438
## 2 7.049608 135 15.61358 299 6.370757 122 5.900783 113 646438
## 3 13.855553 635 28.38752 1301 15.775693 723 4.276675 196 646438
## 4 16.195524 825 27.50294 1401 9.187279 468 4.024342 205 646438
## 5 19.425226 730 38.23842 1437 18.121341 681 2.767429 104 646438
## nonwhitec nhasnc nhblkc othc hispc tpoprc ent pcharge p15_29
## 1 853300 248715 89133 67268 448184 1499738 0.7397115 33 10.000
## 2 853300 248715 89133 67268 448184 1499738 0.6069625 27 11.175
## 3 853300 248715 89133 67268 448184 1499738 0.9111694 55 22.234
## 4 853300 248715 89133 67268 448184 1499738 0.8925200 163 23.263
## 5 853300 248715 89133 67268 448184 1499738 1.1083576 264 28.073
## resource resource_pblk log_tpop log_mincome geometry
## 1 138900.83 138900.83 3.511883 5.142590 MULTIPOLYGON (((-117.1922 3...
## 2 90697.91 90698.43 3.282169 4.957478 MULTIPOLYGON (((-117.1789 3...
## 3 66456.94 66457.81 3.661150 4.822417 MULTIPOLYGON (((-117.1785 3...
## 4 69041.43 69046.53 3.707059 4.839025 MULTIPOLYGON (((-117.1686 3...
## 5 75570.10 75575.10 3.574957 4.878286 MULTIPOLYGON (((-117.1709 3...
Preliminary Analysis: Dealing with Missing Data
##
## Missings per variable:
## Variable Count
## GEOID 14
## tpop 14
## tpopr 14
## medincome 14
## pfpov 14
## powner 14
## phsgrad 14
## pbach 14
## pdiv 14
## psingm 14
## pnhwhite 14
## nhwhite 14
## pnhasn 14
## nhasn 14
## pnhblk 14
## nhblk 14
## phisp 14
## hisp 14
## pnonwhite 14
## nonwhite 14
## pfborn 14
## nfborn 14
## poth 14
## oth 14
## nhwhitec 14
## nonwhitec 14
## nhasnc 14
## nhblkc 14
## othc 14
## hispc 14
## tpoprc 14
## ent 14
## pcharge 14
## p15_29 14
## resource 14
## resource_pblk 14
## log_tpop 14
## log_mincome 14
## geometry 0
##
## Missings in combinations of variables:
## Combinations
## 0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
## 1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0
## Count Percent
## 291 95.409836
## 14 4.590164
##
## Missings per variable:
## Variable Count
## GEOID 0
## tpop 0
## tpopr 0
## medincome 0
## pfpov 0
## powner 0
## phsgrad 0
## pbach 0
## pdiv 0
## psingm 0
## pnhwhite 0
## nhwhite 0
## pnhasn 0
## nhasn 0
## pnhblk 0
## nhblk 0
## phisp 0
## hisp 0
## pnonwhite 0
## nonwhite 0
## pfborn 0
## nfborn 0
## poth 0
## oth 0
## nhwhitec 0
## nonwhitec 0
## nhasnc 0
## nhblkc 0
## othc 0
## hispc 0
## tpoprc 0
## ent 0
## pcharge 0
## p15_29 0
## resource 0
## resource_pblk 0
## log_tpop 0
## log_mincome 0
## geometry 0
##
## Missings in combinations of variables:
## Combinations
## 0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
## Count Percent
## 291 100
Preliminary Analysis: Creating a Histogram for Police Charges in San Diego City
## although coordinates are longitude/latitude, st_union assumes that they are planar
## Simple feature collection with 1 feature and 3 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -117.2822 ymin: 32.53471 xmax: -116.9057 ymax: 33.11418
## proj4string: +proj=longlat +ellps=GRS80 +no_defs
## meanPC sdPC maxPC geometry
## 1 72.63918 102.8184 849 MULTIPOLYGON (((-116.9266 3...
Preliminary Analysis: Dissimilarity Index for San Diego City
## although coordinates are longitude/latitude, st_union assumes that they are planar
## Simple feature collection with 1 feature and 4 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -117.2822 ymin: 32.53471 xmax: -116.9057 ymax: 33.11418
## proj4string: +proj=longlat +ellps=GRS80 +no_defs
## BWD AWD HWD NWWD geometry
## 1 0.5719762 0.4678355 0.5453133 0.4466351 MULTIPOLYGON (((-116.9266 3...
Preliminary Analysis: Interaction Index for San Diego City
## although coordinates are longitude/latitude, st_union assumes that they are planar
## Simple feature collection with 1 feature and 3 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -117.2822 ymin: 32.53471 xmax: -116.9057 ymax: 33.11418
## proj4string: +proj=longlat +ellps=GRS80 +no_defs
## BWI AWI HWI geometry
## 1 0.2936851 0.3771808 0.2729814 MULTIPOLYGON (((-116.9266 3...
Preliminary Analysis: Multigroup Entropy Index in San Diego City
## [1] 1.609438
Preliminary Analysis: Location Quotients of San Diego City
Preliminary Analysis: Mapping the LQRSS in San Diego City
Preliminary Analysis: Scatter plots of Police Charges and Independent Variables with Lines of Best Fit
## Warning: Removed 287 rows containing missing values (geom_segment).
## Warning: Removed 285 rows containing missing values (geom_segment).
## Warning: Removed 274 rows containing missing values (geom_segment).
## Warning: Removed 289 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 282 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 276 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 282 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
Preliminary Analysis: Collinearity Analysis of Regressor Variables
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.83841725 1.192724
## 2 p15_29 0.39357496 2.540812
## 3 medincome 0.20839355 4.798613
## 4 pfpov 0.21943915 4.557072
## 5 powner 0.24175198 4.136471
## 6 pdiv 0.47796777 2.092191
## 7 psingm 0.38182337 2.619012
## 8 phsgrad 0.23374277 4.278207
## 9 pbach 0.20894041 4.786054
## 10 pnhasn 0.13738323 7.278909
## 11 pnhblk 0.42561285 2.349553
## 12 phisp 0.09420211 10.615474
## 13 poth 0.54621555 1.830779
## 14 pfborn 0.13686526 7.306456
## 15 ent 0.27895281 3.584836
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 12.083724428 1.000000 2.891322e-05 9.348549e-04 3.537684e-04
## 2 1.663663438 2.695055 8.356136e-06 5.352696e-04 2.347880e-06
## 3 0.541443272 4.724153 1.265208e-04 3.188161e-04 1.859041e-05
## 4 0.470183217 5.069520 2.248168e-07 4.967628e-03 1.725015e-04
## 5 0.268222119 6.712018 4.125481e-05 6.210156e-05 1.021253e-01
## 6 0.240575772 7.087196 2.356468e-05 7.444177e-04 4.791112e-03
## 7 0.182136940 8.145193 5.263863e-05 3.526002e-01 1.549038e-04
## 8 0.160547008 8.675596 3.089375e-07 2.912203e-01 1.742784e-02
## 9 0.137000190 9.391605 4.406459e-04 2.555685e-01 7.746973e-02
## 10 0.092892347 11.405398 5.727061e-06 1.676659e-04 4.187941e-02
## 11 0.057278012 14.524675 1.990617e-04 1.211733e-02 1.125633e-01
## 12 0.044051615 16.562256 1.370767e-04 8.088087e-03 3.015115e-02
## 13 0.022893321 22.974497 4.445932e-06 2.061848e-02 1.419071e-03
## 14 0.018286385 25.706117 3.123604e-04 4.545099e-02 1.173405e-01
## 15 0.013331459 30.106589 4.273982e-04 3.613583e-03 1.443014e-03
## 16 0.003770476 56.611197 9.981915e-01 2.991717e-03 4.926874e-01
## medincome pfpov powner pdiv psingm
## 1 1.783539e-04 0.0004283910 2.491800e-04 0.0003998174 0.0007047589
## 2 1.649249e-03 0.0127888873 2.262799e-03 0.0003655993 0.0104446905
## 3 8.586625e-04 0.0003980518 5.866211e-03 0.0125647919 0.0016846099
## 4 4.305399e-04 0.0094129932 2.628440e-06 0.0069395989 0.0059308326
## 5 8.905797e-03 0.0071622573 4.088413e-02 0.0031389730 0.0722147010
## 6 8.727928e-04 0.0366301059 1.162976e-02 0.0019923142 0.1830811232
## 7 2.563136e-03 0.0123330003 5.096474e-04 0.0725419208 0.0086206377
## 8 2.029657e-03 0.0055881111 7.033281e-03 0.0017917764 0.0002968071
## 9 3.421300e-02 0.0019715300 1.688724e-02 0.1603017810 0.0041466079
## 10 7.698205e-05 0.5115890839 1.866936e-03 0.0006513013 0.6106477688
## 11 4.125537e-03 0.2522096709 1.152263e-01 0.0057916816 0.0343412794
## 12 3.965923e-02 0.0029698185 1.027697e-01 0.1821038526 0.0128277951
## 13 7.203478e-01 0.0122117346 4.129006e-01 0.3924169221 0.0071958182
## 14 3.696548e-03 0.0025384305 8.777770e-03 0.0104229991 0.0269468571
## 15 2.461388e-03 0.0494973436 1.255488e-02 0.0600315200 0.0017272821
## 16 1.779314e-01 0.0822705903 2.605788e-01 0.0885451503 0.0191884303
## phsgrad pbach pnhasn pnhblk phisp
## 1 0.0002891902 2.316861e-04 0.0002590530 0.0008421363 1.666058e-04
## 2 0.0016571829 3.754302e-03 0.0014780204 0.0099484745 3.506793e-03
## 3 0.0005177834 4.225901e-03 0.0642976222 0.0390516117 2.556073e-03
## 4 0.0004299060 9.378137e-07 0.0090403982 0.3196005675 3.587229e-03
## 5 0.0023565795 1.458549e-03 0.0009339483 0.0343410855 3.043275e-03
## 6 0.0296497234 5.829032e-03 0.0035222661 0.0067569123 1.696197e-02
## 7 0.0004103979 2.542415e-02 0.0243731251 0.0005199538 7.686256e-03
## 8 0.0306523543 2.169767e-02 0.0002520836 0.0520629675 5.468176e-03
## 9 0.0139882696 7.241429e-05 0.0034080651 0.0411883720 5.627016e-03
## 10 0.0055607796 2.506464e-02 0.0079815335 0.0154818393 3.473412e-04
## 11 0.0326468424 1.728839e-01 0.0193568550 0.1274023643 1.061207e-01
## 12 0.5238051422 1.252464e-01 0.0036804062 0.0249193315 3.245347e-02
## 13 0.0217165586 3.336750e-01 0.0011081630 0.0083164746 3.192788e-05
## 14 0.1528627143 2.207558e-04 0.0125651804 0.1934506745 2.155729e-01
## 15 0.0417154798 8.647600e-02 0.8416764531 0.1231546197 5.507125e-01
## 16 0.1417410958 1.937387e-01 0.0060668270 0.0029626150 4.615778e-02
## poth pfborn ent
## 1 0.0007185384 1.527352e-04 1.211802e-04
## 2 0.0044646553 1.732852e-04 7.138123e-05
## 3 0.0038882716 2.518850e-03 4.145719e-04
## 4 0.0033021969 5.063002e-03 9.401597e-04
## 5 0.0093475393 1.355920e-06 2.969971e-04
## 6 0.1147613128 4.922864e-03 3.524291e-04
## 7 0.1101547191 3.397673e-03 3.596384e-06
## 8 0.3432295843 5.147120e-05 2.507998e-04
## 9 0.0044486036 1.399381e-04 2.448692e-04
## 10 0.0596132537 3.397827e-03 2.269986e-04
## 11 0.0473933399 5.283017e-02 3.544322e-03
## 12 0.0300970463 5.202965e-02 1.782684e-03
## 13 0.0006391901 3.956522e-03 1.192576e-03
## 14 0.2143879279 1.225277e-01 6.641871e-01
## 15 0.0499354824 7.343130e-01 2.473038e-01
## 16 0.0036183384 1.452400e-02 7.906662e-02
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8388719 1.192077
## 2 p15_29 0.4201144 2.380304
## 3 medincome 0.2299305 4.349140
## 4 powner 0.2849526 3.509356
## 5 pdiv 0.5548050 1.802435
## 6 psingm 0.5297516 1.887677
## 7 phsgrad 0.2612332 3.827998
## 8 pnhasn 0.1468576 6.809317
## 9 pnhblk 0.4603638 2.172195
## 10 phisp 0.1069953 9.346208
## 11 poth 0.5490543 1.821313
## 12 pfborn 0.1493106 6.697450
## 13 ent 0.2793804 3.579349
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 10.82565230 1.000000 4.842114e-05 1.169120e-03 4.696996e-04
## 2 1.15963438 3.055389 1.502275e-05 1.245174e-03 6.204998e-05
## 3 0.51381930 4.590097 2.571415e-04 1.450260e-05 3.747630e-06
## 4 0.44874324 4.911658 6.452265e-07 5.719690e-03 6.605722e-07
## 5 0.26039189 6.447826 7.182204e-05 5.058311e-07 1.171704e-01
## 6 0.22141763 6.992314 4.541655e-05 5.017169e-03 1.021272e-04
## 7 0.17172875 7.939726 8.705856e-05 6.015578e-01 8.356182e-04
## 8 0.13982402 8.799057 5.734255e-05 1.023564e-01 2.162995e-02
## 9 0.13635924 8.910145 8.516724e-04 1.883158e-01 1.355136e-01
## 10 0.05223320 14.396394 3.127559e-09 1.393924e-03 2.416214e-02
## 11 0.03179691 18.451623 1.301020e-03 4.370283e-02 9.048106e-02
## 12 0.01833507 24.298852 1.618185e-04 4.429419e-02 1.208749e-01
## 13 0.01520946 26.679037 8.638672e-03 1.593677e-03 1.885510e-02
## 14 0.00485460 47.222644 9.884639e-01 3.619176e-03 4.698389e-01
## medincome powner pdiv psingm phsgrad
## 1 2.450790e-04 0.0003670551 0.0005749739 1.199871e-03 4.046053e-04
## 2 3.675673e-03 0.0052798417 0.0003266496 2.782083e-02 4.248368e-03
## 3 2.464724e-03 0.0131308408 0.0172486057 6.759570e-04 6.480945e-04
## 4 5.895522e-05 0.0004872589 0.0088714460 1.376152e-02 3.764139e-05
## 5 7.893665e-03 0.0434250913 0.0042170430 9.267935e-02 3.028766e-04
## 6 1.266542e-04 0.0052225981 0.0114691285 4.887644e-01 2.330028e-02
## 7 4.864718e-03 0.0007366442 0.0863001414 5.149124e-02 3.612204e-03
## 8 1.488669e-03 0.0087789432 0.1288966374 1.073447e-01 2.557799e-02
## 9 3.655440e-02 0.0135254638 0.1039652613 1.266569e-02 3.661076e-02
## 10 2.826209e-04 0.0130329154 0.1188232568 8.831097e-02 5.082928e-01
## 11 5.476741e-01 0.7512706405 0.0176581803 1.717521e-05 5.694732e-02
## 12 4.346093e-03 0.0095854477 0.0088938573 2.250667e-02 1.812551e-01
## 13 5.544097e-02 0.0003767345 0.2896531095 1.442451e-02 7.198934e-02
## 14 3.348836e-01 0.1347805249 0.2031017093 7.833705e-02 8.677260e-02
## pnhasn pnhblk phisp poth pfborn ent
## 1 0.0003514195 0.001153994 0.0002346137 0.0009070387 2.074434e-04 0.0001518668
## 2 0.0047314097 0.026633402 0.0083596841 0.0097486498 2.560074e-04 0.0001223287
## 3 0.0666049091 0.058702086 0.0025329565 0.0013262752 2.855178e-03 0.0002844443
## 4 0.0097064682 0.322680421 0.0098905440 0.0074688430 7.773639e-03 0.0010299188
## 5 0.0035822857 0.046287978 0.0003394386 0.0432129207 7.473232e-04 0.0006399087
## 6 0.0066936255 0.012631337 0.0072361995 0.1516510858 4.515608e-03 0.0002138451
## 7 0.0180395531 0.043165357 0.0028461656 0.0065760470 1.808755e-03 0.0001837898
## 8 0.0071866243 0.001703842 0.0370432643 0.3518118568 1.813553e-04 0.0001211551
## 9 0.0008363062 0.039080922 0.0002704604 0.0858372730 6.457595e-05 0.0001392582
## 10 0.0387061627 0.121524142 0.0656371275 0.0724504788 1.268591e-01 0.0033599147
## 11 0.0100704572 0.001033195 0.0072143694 0.0032392738 1.819740e-05 0.0005515834
## 12 0.0232470625 0.186473117 0.2963730024 0.2048063273 1.539527e-01 0.6285366542
## 13 0.7179318368 0.106288485 0.5615336169 0.0607223931 5.746046e-01 0.2341104857
## 14 0.0923118797 0.032641722 0.0004885570 0.0002415370 1.261556e-01 0.1305548464
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8395353 1.191135
## 2 p15_29 0.4624880 2.162218
## 3 medincome 0.2470467 4.047817
## 4 powner 0.2910017 3.436407
## 5 pdiv 0.5686597 1.758521
## 6 psingm 0.5504510 1.816692
## 7 pnhasn 0.5291781 1.889723
## 8 pnhblk 0.4889996 2.044991
## 9 phisp 0.2971968 3.364774
## 10 poth 0.5512038 1.814211
## 11 ent 0.2895018 3.454210
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 9.159676498 1.000000 7.767480e-05 0.0016495493 7.227954e-04
## 2 1.041031035 2.966253 1.430254e-06 0.0005023079 4.772522e-04
## 3 0.498454305 4.286742 2.735210e-04 0.0004786789 5.304214e-08
## 4 0.380590473 4.905814 4.624992e-06 0.0167545095 1.937122e-03
## 5 0.257687567 5.962019 1.044953e-04 0.0009522347 1.294173e-01
## 6 0.194713676 6.858701 1.503305e-04 0.0541605984 4.443190e-03
## 7 0.164254461 7.467607 4.834605e-04 0.5069226367 4.341825e-03
## 8 0.137974797 8.147797 2.730106e-04 0.3217985381 1.891069e-02
## 9 0.109833027 9.132162 1.571654e-04 0.0046553974 1.726831e-01
## 10 0.032199260 16.866195 1.328254e-03 0.0499631757 1.223011e-01
## 11 0.018040195 22.533022 3.165673e-03 0.0375749970 1.303018e-01
## 12 0.005544706 40.644409 9.939804e-01 0.0045873764 4.144639e-01
## medincome powner pdiv psingm pnhasn pnhblk
## 1 0.0003825595 5.443793e-04 8.334719e-04 0.001671555 0.001772224 0.001668397
## 2 0.0037854968 5.266872e-03 7.299267e-05 0.045025260 0.018992048 0.046650583
## 3 0.0026294079 1.098689e-02 9.890376e-03 0.004611239 0.180990437 0.169044503
## 4 0.0002456357 8.168515e-03 2.577566e-02 0.045385752 0.162226210 0.253686950
## 5 0.0081255023 3.909636e-02 9.062043e-03 0.133960528 0.029375631 0.028911274
## 6 0.0029120267 3.649057e-03 2.154036e-05 0.367657746 0.039018160 0.032582538
## 7 0.0015628352 2.409454e-03 1.044262e-01 0.018694512 0.202110195 0.026927256
## 8 0.0247349255 2.406944e-02 2.206862e-01 0.034147138 0.008010370 0.022827606
## 9 0.0276099099 4.756734e-05 4.375973e-02 0.247498972 0.036387778 0.003843993
## 10 0.5783838058 7.746598e-01 6.534370e-02 0.004986371 0.008773378 0.004137492
## 11 0.0180711309 1.044539e-02 1.840367e-01 0.017819166 0.310540252 0.394131163
## 12 0.3315567636 1.206562e-01 3.360913e-01 0.078541761 0.001803315 0.015588246
## phisp poth ent
## 1 8.390120e-04 1.322159e-03 2.221736e-04
## 2 3.029417e-02 8.503154e-03 3.515071e-05
## 3 1.782920e-02 4.732851e-03 7.692429e-04
## 4 2.891499e-02 8.867852e-04 2.899789e-04
## 5 4.793071e-04 3.532216e-02 6.424592e-04
## 6 5.720706e-02 3.064222e-01 2.807534e-04
## 7 3.476914e-05 7.528560e-02 1.242387e-04
## 8 8.341455e-02 4.925873e-02 2.310273e-04
## 9 3.139815e-01 2.199851e-01 7.768134e-05
## 10 1.773066e-02 5.105862e-07 3.288424e-07
## 11 1.038015e-03 2.982799e-01 8.710759e-01
## 12 4.482368e-01 8.313907e-07 1.262511e-01
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8789570 1.137712
## 2 p15_29 0.4677276 2.137996
## 3 medincome 0.2483192 4.027075
## 4 powner 0.2911086 3.435144
## 5 pdiv 0.5874219 1.702354
## 6 psingm 0.5509594 1.815016
## 7 pnhasn 0.7039603 1.420535
## 8 pnhblk 0.7991173 1.251381
## 9 phisp 0.3092885 3.233227
## 10 poth 0.7299130 1.370026
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 8.195822428 1.000000 1.069126e-04 2.162564e-03 9.116760e-04
## 2 1.038883824 2.808748 3.232849e-06 6.507298e-04 4.306152e-04
## 3 0.488005625 4.098112 2.493424e-04 4.564537e-05 1.748789e-05
## 4 0.378081424 4.655900 6.135383e-06 1.596032e-02 2.038857e-03
## 5 0.255244957 5.666536 1.487002e-04 4.942746e-04 1.377774e-01
## 6 0.194103518 6.497998 1.411925e-04 5.353636e-02 2.911297e-03
## 7 0.164065392 7.067857 5.641290e-04 5.385498e-01 5.391145e-03
## 8 0.137733309 7.713949 2.665077e-04 3.317152e-01 1.678825e-02
## 9 0.109783731 8.640269 1.624080e-04 4.574361e-03 1.721158e-01
## 10 0.032199251 15.954140 1.461870e-03 5.225523e-02 1.235495e-01
## 11 0.006076542 36.725525 9.968896e-01 5.553427e-05 5.380680e-01
## medincome powner pdiv psingm pnhasn pnhblk
## 1 0.0004809093 6.822861e-04 1.074483e-03 0.002116177 0.002908061 0.003372148
## 2 0.0039861252 5.542162e-03 1.063669e-04 0.044073337 0.025741203 0.076547128
## 3 0.0021020399 1.018871e-02 1.082010e-02 0.002957361 0.284221137 0.274917322
## 4 0.0003294943 8.479600e-03 2.568844e-02 0.044689881 0.181793997 0.473403112
## 5 0.0074080589 3.767877e-02 1.027893e-02 0.146125541 0.032015391 0.027089278
## 6 0.0027905809 3.924982e-03 3.541083e-05 0.356658884 0.050962371 0.043185293
## 7 0.0014821536 2.398691e-03 1.084515e-01 0.019703017 0.272133493 0.039286509
## 8 0.0246909444 2.415585e-02 2.361049e-01 0.036192635 0.013220406 0.032361786
## 9 0.0278547025 4.128549e-05 4.784794e-02 0.245856152 0.051421769 0.005176477
## 10 0.5814456644 7.748676e-01 6.762985e-02 0.004981515 0.011587088 0.006842759
## 11 0.3474293265 1.320401e-01 4.919620e-01 0.096645498 0.073995085 0.017818189
## phisp poth
## 1 1.110299e-03 2.166785e-03
## 2 3.081076e-02 1.164010e-02
## 3 1.654170e-02 7.626705e-03
## 4 3.207944e-02 1.761357e-03
## 5 4.029968e-04 5.085976e-02
## 6 6.038681e-02 4.322721e-01
## 7 7.797914e-05 8.875884e-02
## 8 9.013730e-02 5.937084e-02
## 9 3.239783e-01 2.981694e-01
## 10 1.844897e-02 1.879815e-07
## 11 4.260254e-01 4.737388e-02
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8859771 1.128697
## 2 p15_29 0.6438512 1.553154
## 3 medincome 0.2967510 3.369829
## 4 pdiv 0.5877953 1.701273
## 5 psingm 0.5649919 1.769937
## 6 pnhasn 0.7253923 1.378564
## 7 pnhblk 0.7998275 1.250270
## 8 phisp 0.3177611 3.147018
## 9 poth 0.7303913 1.369129
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 7.449156752 1.000000 1.515493e-04 0.002634860 1.551856e-03
## 2 0.947890507 2.803332 1.976925e-05 0.002209975 3.390074e-05
## 3 0.455737178 4.042931 4.532278e-04 0.003779438 2.159155e-03
## 4 0.356577195 4.570637 1.980467e-04 0.008373939 1.194993e-03
## 5 0.208930663 5.971074 7.135028e-05 0.003242317 2.152912e-01
## 6 0.184721960 6.350301 7.784354e-05 0.246874284 6.724647e-02
## 7 0.161781821 6.785607 7.453858e-04 0.304880321 1.545295e-03
## 8 0.118647144 7.923643 2.309961e-03 0.415060725 4.422853e-03
## 9 0.109736682 8.239060 1.018495e-04 0.011690069 2.482671e-01
## 10 0.006820097 33.048996 9.958710e-01 0.001254072 4.582872e-01
## medincome pdiv psingm pnhasn pnhblk phisp
## 1 6.635630e-04 0.0012820216 0.002735384 0.003624271 0.0042896226 0.001444761
## 2 5.747702e-03 0.0001878691 0.047888378 0.054289621 0.0740411429 0.034928591
## 3 3.375033e-03 0.0087787365 0.003042729 0.176501716 0.5458071318 0.021188777
## 4 1.319201e-03 0.0532172588 0.077935776 0.337141106 0.2049788528 0.028866481
## 5 1.205810e-02 0.0023421633 0.376648841 0.028951071 0.0002865198 0.054854093
## 6 2.302802e-02 0.0037581218 0.110467886 0.003520855 0.0637784983 0.009553794
## 7 9.583119e-05 0.1922707112 0.025611816 0.287055353 0.0324237377 0.003890096
## 8 1.682732e-01 0.1170504916 0.019227972 0.007416805 0.0527539380 0.071074290
## 9 2.269930e-02 0.0409056193 0.261302333 0.050548011 0.0032613389 0.352996586
## 10 7.627400e-01 0.5802070069 0.075138886 0.050951191 0.0183792173 0.421202532
## poth
## 1 2.588135e-03
## 2 2.005191e-02
## 3 1.403430e-03
## 4 1.237032e-02
## 5 3.728669e-02
## 6 3.868420e-01
## 7 1.960377e-01
## 8 7.223051e-05
## 9 2.949894e-01
## 10 4.835812e-02
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8859843 1.128688
## 2 p15_29 0.6437446 1.553411
## 3 resource 0.2967084 3.370312
## 4 pdiv 0.5877991 1.701262
## 5 psingm 0.5649808 1.769972
## 6 pnhasn 0.7253869 1.378575
## 7 pnhblk 0.7998250 1.250273
## 8 phisp 0.3177466 3.147162
## 9 poth 0.7303908 1.369130
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 7.449159267 1.000000 1.515227e-04 0.002634878 1.551595e-03
## 2 0.947885753 2.803339 1.976791e-05 0.002210007 3.390374e-05
## 3 0.455738995 4.042924 4.531538e-04 0.003779016 2.158445e-03
## 4 0.356579345 4.570624 1.979789e-04 0.008374903 1.194029e-03
## 5 0.208933859 5.971030 7.132226e-05 0.003244204 2.152803e-01
## 6 0.184723482 6.350276 7.787599e-05 0.246817281 6.721296e-02
## 7 0.161781591 6.785613 7.452920e-04 0.304989409 1.541430e-03
## 8 0.118645088 7.923713 2.309111e-03 0.415071976 4.450143e-03
## 9 0.109733745 8.239171 1.024524e-04 0.011624442 2.481892e-01
## 10 0.006818876 33.051962 9.958715e-01 0.001253886 4.583880e-01
## resource pdiv psingm pnhasn pnhblk phisp
## 1 6.634346e-04 0.0012820332 0.002735330 0.003624231 0.0042896101 0.001444695
## 2 5.746414e-03 0.0001879298 0.047887956 0.054289013 0.0740413134 0.034927363
## 3 3.374852e-03 0.0087797397 0.003042267 0.176510690 0.5457853053 0.021186764
## 4 1.319683e-03 0.0532145366 0.077930538 0.337129048 0.2050046584 0.028865777
## 5 1.206194e-02 0.0023420155 0.376602700 0.028937299 0.0002874671 0.054840774
## 6 2.301999e-02 0.0037603512 0.110506118 0.003530830 0.0637683867 0.009560546
## 7 9.537504e-05 0.1922375200 0.025615535 0.287044000 0.0324225756 0.003888788
## 8 1.681717e-01 0.1170333227 0.019308194 0.007400081 0.0527412267 0.071237114
## 9 2.276032e-02 0.0409890213 0.261213726 0.050573224 0.0032754917 0.352821933
## 10 7.627863e-01 0.5801735301 0.075157635 0.050961584 0.0183839651 0.421226245
## poth
## 1 2.588131e-03
## 2 2.005232e-02
## 3 1.403449e-03
## 4 1.236826e-02
## 5 3.725568e-02
## 6 3.869021e-01
## 7 1.960088e-01
## 8 6.700192e-05
## 9 2.950011e-01
## 10 4.835313e-02
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8862389 1.128364
## 2 p15_29 0.6441169 1.552513
## 3 resource_pblk 0.3114825 3.210453
## 4 pdiv 0.5879466 1.700835
## 5 psingm 0.5822279 1.717541
## 6 pnhasn 0.7324750 1.365234
## 7 phisp 0.3178276 3.146360
## 8 poth 0.7312571 1.367508
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 6.954164720 1.000000 1.783316e-04 0.0030631550 1.782826e-03
## 2 0.859169930 2.845004 1.171493e-07 0.0008189049 4.404483e-04
## 3 0.379007015 4.283501 5.536712e-04 0.0008184716 2.099484e-03
## 4 0.208996671 5.768366 6.491568e-05 0.0064770182 2.222928e-01
## 5 0.194122666 5.985278 8.438776e-05 0.2977992601 4.290954e-02
## 6 0.164732862 6.497292 6.150027e-04 0.1579114838 1.088866e-02
## 7 0.122956534 7.520499 2.541609e-03 0.5098423305 1.394711e-05
## 8 0.109906196 7.954473 4.097778e-05 0.0221584303 2.567844e-01
## 9 0.006943405 31.647269 9.959210e-01 0.0011109455 4.627879e-01
## resource_pblk pdiv psingm pnhasn phisp poth
## 1 0.0008262868 0.0014765011 0.0031390743 0.0042719549 0.001615200 0.003027924
## 2 0.0050167461 0.0000036992 0.0716528656 0.0720465021 0.054198327 0.021575429
## 3 0.0059778146 0.0557126928 0.0555134309 0.5087367716 0.005544771 0.005016585
## 4 0.0147877109 0.0017096744 0.3770894839 0.0298770503 0.049858516 0.030039517
## 5 0.0341973985 0.0041523312 0.1025100838 0.0002388157 0.031272209 0.294410509
## 6 0.0000336732 0.2167480996 0.0041604870 0.2807384649 0.005297793 0.302855116
## 7 0.1652720714 0.0964028109 0.0002899355 0.0013417999 0.052648130 0.001482686
## 8 0.0136543915 0.0282669850 0.2925613245 0.0436961334 0.373492161 0.290036262
## 9 0.7602339071 0.5955272058 0.0930833145 0.0590525072 0.426072893 0.051555972
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 tpop 0.8788133 1.137898
## 2 p15_29 0.4535734 2.204715
## 3 medincome 0.2482757 4.027781
## 4 powner 0.2857560 3.499489
## 5 pdiv 0.5869497 1.703723
## 6 psingm 0.5459496 1.831671
## 7 pnhasn 0.1911787 5.230709
## 8 phisp 0.1622757 6.162351
## 9 pnhblk 0.7796397 1.282644
## 10 poth 0.7095343 1.409375
## 11 pfborn 0.1633013 6.123650
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept tpop p15_29
## 1 9.054324470 1.000000 8.400196e-05 1.767384e-03 7.233055e-04
## 2 1.055390845 2.929013 1.025742e-05 9.195605e-04 2.540277e-04
## 3 0.507508228 4.223831 3.011110e-04 2.202221e-05 2.897193e-05
## 4 0.436183334 4.556103 1.187047e-06 4.689383e-03 5.713080e-06
## 5 0.257460664 5.930244 1.229054e-04 1.646073e-04 1.370076e-01
## 6 0.205881412 6.631617 1.896078e-04 1.555336e-05 3.463548e-03
## 7 0.170004582 7.297897 2.767938e-04 6.481048e-01 8.413925e-04
## 8 0.138200124 8.094198 1.506755e-04 2.900692e-01 8.988964e-03
## 9 0.116902593 8.800674 4.570817e-04 2.314504e-03 1.750648e-01
## 10 0.033200277 16.514186 9.723082e-04 4.073781e-02 9.659093e-02
## 11 0.019032412 21.811278 6.099772e-06 1.099699e-02 1.893138e-02
## 12 0.005911059 39.137708 9.974280e-01 1.982130e-04 5.580993e-01
## medincome powner pdiv psingm pnhasn phisp
## 1 3.876749e-04 0.0005370362 0.0008660879 0.001749620 0.0006652911 0.0004945976
## 2 4.296902e-03 0.0060571451 0.0003149422 0.040282569 0.0060350716 0.0154424562
## 3 2.138234e-03 0.0121060434 0.0202470415 0.001400147 0.0988442519 0.0033564368
## 4 2.261565e-05 0.0004908292 0.0078005978 0.016378186 0.0045636535 0.0176628720
## 5 7.695314e-03 0.0430425697 0.0049292275 0.088587073 0.0044267290 0.0003650726
## 6 7.919342e-04 0.0046081704 0.0113275044 0.453831144 0.0036379686 0.0198165524
## 7 3.387221e-03 0.0011849555 0.1063031336 0.038600225 0.0258778075 0.0029699481
## 8 2.162377e-02 0.0215398585 0.2383658189 0.048365585 0.0101898281 0.0477377116
## 9 2.859890e-02 0.0006598005 0.0461216138 0.217930409 0.0013979518 0.0822396350
## 10 5.335447e-01 0.7075684758 0.0465531678 0.004766473 0.0626427724 0.0070791157
## 11 7.151480e-02 0.0538681495 0.0564247904 0.004709485 0.7806511300 0.6987649639
## 12 3.259980e-01 0.1483369661 0.4607460741 0.083399084 0.0010675445 0.1040706382
## pnhblk poth pfborn
## 1 0.002692108 0.0016939017 0.0003241004
## 2 0.064848819 0.0126864734 0.0004798145
## 3 0.054490528 0.0014870820 0.0041312850
## 4 0.643017943 0.0128518550 0.0069104593
## 5 0.048970373 0.0663421124 0.0008393593
## 6 0.048417325 0.3308126010 0.0070370358
## 7 0.040430360 0.0005307453 0.0034877101
## 8 0.035976891 0.1046875988 0.0005179427
## 9 0.001119835 0.3952516120 0.0098006015
## 10 0.014281914 0.0005353345 0.0378220616
## 11 0.019630922 0.0137747503 0.8897912617
## 12 0.026122982 0.0593459336 0.0388583681
Checking for Collinearity between Economic Variables
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Preliminary Analysis: Negative Binomial Regression Tests
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + p15_29 + medincome + powner +
## pdiv + psingm + pnhasn + pnhblk + phisp + poth + pfborn,
## data = SD_Police_Census, init.theta = 1.342679871, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.2581 -0.7946 -0.2303 0.3760 2.9404
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.539e+00 1.203e+00 1.279 0.20090
## log_tpop 9.868e-01 3.121e-01 3.162 0.00157 **
## p15_29 9.954e-03 7.325e-03 1.359 0.17420
## medincome -7.231e-06 2.873e-06 -2.517 0.01185 *
## powner -4.851e-02 1.087e-02 -4.463 8.10e-06 ***
## pdiv 9.411e-02 1.903e-02 4.946 7.56e-07 ***
## psingm -2.837e-03 2.395e-02 -0.118 0.90568
## pnhasn -3.663e-02 8.455e-03 -4.333 1.47e-05 ***
## pnhblk 1.499e-02 8.641e-03 1.735 0.08278 .
## phisp -3.339e-02 5.225e-03 -6.391 1.65e-10 ***
## poth -3.589e-02 2.412e-02 -1.488 0.13679
## pfborn 3.409e-02 1.066e-02 3.198 0.00138 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.3427) family taken to be 1)
##
## Null deviance: 571.71 on 290 degrees of freedom
## Residual deviance: 342.99 on 279 degrees of freedom
## AIC: 2923.3
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.343
## Std. Err.: 0.114
##
## 2 x log-likelihood: -2897.268
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + medincome + pdiv + psingm +
## pnhasn + pnhblk + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.206806138, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.0473 -0.7849 -0.2796 0.3159 2.7556
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.712e+00 1.194e+00 1.434 0.151691
## log_tpop 1.087e+00 3.260e-01 3.336 0.000851 ***
## medincome -1.936e-05 2.316e-06 -8.361 < 2e-16 ***
## pdiv 6.753e-02 1.834e-02 3.683 0.000231 ***
## psingm -1.234e-02 2.429e-02 -0.508 0.611252
## pnhasn -4.054e-02 8.667e-03 -4.678 2.90e-06 ***
## pnhblk 9.065e-03 9.097e-03 0.997 0.318995
## phisp -3.622e-02 5.445e-03 -6.652 2.89e-11 ***
## pfborn 4.124e-02 1.090e-02 3.784 0.000154 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.2068) family taken to be 1)
##
## Null deviance: 519.14 on 290 degrees of freedom
## Residual deviance: 342.42 on 282 degrees of freedom
## AIC: 2948.2
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.207
## Std. Err.: 0.100
##
## 2 x log-likelihood: -2928.184
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + resource + pdiv + psingm +
## pnhasn + pnhblk + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.206880171, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.0473 -0.7849 -0.2797 0.3159 2.7558
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.712e+00 1.194e+00 1.434 0.151607
## log_tpop 1.087e+00 3.260e-01 3.336 0.000851 ***
## resource -1.936e-05 2.315e-06 -8.362 < 2e-16 ***
## pdiv 6.753e-02 1.834e-02 3.683 0.000231 ***
## psingm -1.235e-02 2.429e-02 -0.508 0.611205
## pnhasn -4.054e-02 8.667e-03 -4.678 2.90e-06 ***
## pnhblk 9.065e-03 9.097e-03 0.996 0.319013
## phisp -3.623e-02 5.445e-03 -6.653 2.88e-11 ***
## pfborn 4.124e-02 1.090e-02 3.784 0.000154 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.2069) family taken to be 1)
##
## Null deviance: 519.17 on 290 degrees of freedom
## Residual deviance: 342.42 on 282 degrees of freedom
## AIC: 2948.2
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.207
## Std. Err.: 0.100
##
## 2 x log-likelihood: -2928.166
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + resource_pblk + pdiv +
## psingm + pnhasn + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.203526981, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.0575 -0.7921 -0.2540 0.3205 2.6645
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.685e+00 1.195e+00 1.411 0.158372
## log_tpop 1.109e+00 3.263e-01 3.399 0.000676 ***
## resource_pblk -1.979e-05 2.248e-06 -8.801 < 2e-16 ***
## pdiv 6.955e-02 1.835e-02 3.791 0.000150 ***
## psingm -7.576e-03 2.382e-02 -0.318 0.750477
## pnhasn -3.891e-02 8.540e-03 -4.556 5.20e-06 ***
## phisp -3.532e-02 5.429e-03 -6.506 7.74e-11 ***
## pfborn 3.932e-02 1.080e-02 3.642 0.000271 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.2035) family taken to be 1)
##
## Null deviance: 517.86 on 290 degrees of freedom
## Residual deviance: 342.41 on 283 degrees of freedom
## AIC: 2947
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.2035
## Std. Err.: 0.0998
##
## 2 x log-likelihood: -2928.9890
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + powner + pdiv + psingm +
## pnhasn + pnhblk + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.294620567, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.3885 -0.7417 -0.2250 0.3542 2.8849
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.769764 1.150088 1.539 0.12385
## log_tpop 0.853893 0.311603 2.740 0.00614 **
## powner -0.072956 0.007318 -9.970 < 2e-16 ***
## pdiv 0.106845 0.016307 6.552 5.67e-11 ***
## psingm -0.007088 0.023315 -0.304 0.76110
## pnhasn -0.036547 0.008375 -4.364 1.28e-05 ***
## pnhblk 0.019379 0.008636 2.244 0.02484 *
## phisp -0.027434 0.004984 -5.505 3.70e-08 ***
## pfborn 0.029517 0.010511 2.808 0.00498 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.2946) family taken to be 1)
##
## Null deviance: 553.20 on 290 degrees of freedom
## Residual deviance: 342.87 on 282 degrees of freedom
## AIC: 2927.9
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.295
## Std. Err.: 0.109
##
## 2 x log-likelihood: -2907.852
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + medincome + pdiv + psingm +
## pnhasn + pnhblk + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.206806138, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.0473 -0.7849 -0.2796 0.3159 2.7556
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.712e+00 1.194e+00 1.434 0.151691
## log_tpop 1.087e+00 3.260e-01 3.336 0.000851 ***
## medincome -1.936e-05 2.316e-06 -8.361 < 2e-16 ***
## pdiv 6.753e-02 1.834e-02 3.683 0.000231 ***
## psingm -1.234e-02 2.429e-02 -0.508 0.611252
## pnhasn -4.054e-02 8.667e-03 -4.678 2.90e-06 ***
## pnhblk 9.065e-03 9.097e-03 0.997 0.318995
## phisp -3.622e-02 5.445e-03 -6.652 2.89e-11 ***
## pfborn 4.124e-02 1.090e-02 3.784 0.000154 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.2068) family taken to be 1)
##
## Null deviance: 519.14 on 290 degrees of freedom
## Residual deviance: 342.42 on 282 degrees of freedom
## AIC: 2948.2
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.207
## Std. Err.: 0.100
##
## 2 x log-likelihood: -2928.184
## Waiting for profiling to be done...
## Estimate 2.5 % 97.5 %
## (Intercept) 1.538946e+00 -1.094884e+00 4.196494e+00
## log_tpop 9.867608e-01 3.382991e-01 1.636627e+00
## p15_29 9.953760e-03 -5.840936e-03 2.616943e-02
## medincome -7.231196e-06 -1.367974e-05 -6.892811e-07
## powner -4.850840e-02 -7.122388e-02 -2.580712e-02
## pdiv 9.410816e-02 5.425212e-02 1.344242e-01
## psingm -2.837354e-03 -5.014201e-02 4.564343e-02
## pnhasn -3.663398e-02 -5.351495e-02 -1.977371e-02
## pnhblk 1.499095e-02 -3.247256e-03 3.459078e-02
## phisp -3.339050e-02 -4.536460e-02 -2.132844e-02
## poth -3.589091e-02 -8.526772e-02 1.481759e-02
## pfborn 3.409284e-02 1.128566e-02 5.718825e-02
Preliminary Analysis: Poisson Model
##
## Call:
## glm(formula = pcharge ~ log_tpop + p15_29 + medincome + powner +
## pdiv + psingm + pnhasn + pnhblk + phisp + pfborn, family = poisson,
## data = SD_Police_Census)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -21.956 -4.474 -1.277 2.338 26.811
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.967e-01 1.665e-01 1.782 0.0747 .
## log_tpop 1.313e+00 4.427e-02 29.646 < 2e-16 ***
## p15_29 4.334e-03 9.293e-04 4.664 3.1e-06 ***
## medincome -6.125e-06 4.647e-07 -13.181 < 2e-16 ***
## powner -5.323e-02 1.464e-03 -36.355 < 2e-16 ***
## pdiv 1.027e-01 2.295e-03 44.753 < 2e-16 ***
## psingm -4.226e-02 3.273e-03 -12.913 < 2e-16 ***
## pnhasn -3.652e-02 1.260e-03 -28.995 < 2e-16 ***
## pnhblk 1.339e-02 1.135e-03 11.802 < 2e-16 ***
## phisp -2.382e-02 7.491e-04 -31.797 < 2e-16 ***
## pfborn 2.600e-02 1.399e-03 18.581 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 24896 on 290 degrees of freedom
## Residual deviance: 12140 on 280 degrees of freedom
## AIC: 13710
##
## Number of Fisher Scoring iterations: 5
## Waiting for profiling to be done...
## Estimate 2.5 % 97.5 %
## (Intercept) 2.966699e-01 -2.994525e-02 6.226346e-01
## log_tpop 1.312509e+00 1.225769e+00 1.399316e+00
## p15_29 4.334061e-03 2.510565e-03 6.153427e-03
## medincome -6.124748e-06 -7.039365e-06 -5.217910e-06
## powner -5.323383e-02 -5.610499e-02 -5.036510e-02
## pdiv 1.026904e-01 9.819311e-02 1.071880e-01
## psingm -4.225970e-02 -4.868375e-02 -3.585490e-02
## pnhasn -3.652330e-02 -3.899458e-02 -3.405683e-02
## pnhblk 1.339276e-02 1.115991e-02 1.560822e-02
## phisp -2.381761e-02 -2.528725e-02 -2.235094e-02
## pfborn 2.599563e-02 2.325149e-02 2.873579e-02
Covid Analysis of Police Report Data: Merging Covid Databases with Master Database
Covid Analysis of Police Report Data: Creating a Histogram for Pre-Covid and Post-Covid Police Reports
## although coordinates are longitude/latitude, st_union assumes that they are planar
## Simple feature collection with 1 feature and 6 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -117.2822 ymin: 32.53471 xmax: -116.9057 ymax: 33.11418
## proj4string: +proj=longlat +ellps=GRS80 +no_defs
## mean_PrePC max_PrePC sd_PrePC mean_PostPC max_PostPC sd_PostPC
## 1 38.71134 458 58.67978 34.06873 402 46.01913
## geometry
## 1 MULTIPOLYGON (((-116.9266 3...
Covid Analysis of Police Report Data: Scatter plots of Pre-Covid Police Reports and Independent Variables with Lines of Best Fit
## Warning: Removed 287 rows containing missing values (geom_segment).
## Warning: Removed 285 rows containing missing values (geom_segment).
## Warning: Removed 274 rows containing missing values (geom_segment).
## Warning: Removed 289 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 282 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 276 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
Covid Analysis of Police Report Data: Scatter plots of Post-Covid Police Reports and Independent Variables with Lines of Best Fit
## Warning: Removed 287 rows containing missing values (geom_segment).
## Warning: Removed 285 rows containing missing values (geom_segment).
## Warning: Removed 274 rows containing missing values (geom_segment).
## Warning: Removed 289 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 282 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 276 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
## Warning: Removed 291 rows containing missing values (geom_segment).
Covid Analysis of Police Report Data: Negative Binomial Regression Tests
##
## Call:
## glm.nb(formula = pc_preC ~ log_tpop + medincome + powner + pdiv +
## psingm + pnhasn + pnhblk + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.279221125, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.9805 -0.8329 -0.2266 0.2856 3.0873
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.525e+00 1.178e+00 1.295 0.195296
## log_tpop 9.557e-01 3.221e-01 2.967 0.003005 **
## medincome -9.940e-06 2.918e-06 -3.407 0.000658 ***
## powner -4.795e-02 9.526e-03 -5.034 4.81e-07 ***
## pdiv 8.260e-02 1.855e-02 4.453 8.49e-06 ***
## psingm -1.967e-02 2.390e-02 -0.823 0.410480
## pnhasn -3.562e-02 8.552e-03 -4.165 3.11e-05 ***
## pnhblk 1.308e-02 8.917e-03 1.467 0.142478
## phisp -3.209e-02 5.368e-03 -5.978 2.26e-09 ***
## pfborn 3.088e-02 1.072e-02 2.882 0.003957 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.2792) family taken to be 1)
##
## Null deviance: 550.12 on 290 degrees of freedom
## Residual deviance: 343.32 on 281 degrees of freedom
## AIC: 2568.5
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.279
## Std. Err.: 0.112
##
## 2 x log-likelihood: -2546.548
##
## Call:
## glm.nb(formula = pc_postC ~ log_tpop + medincome + powner + pdiv +
## psingm + pnhasn + pnhblk + phisp + pfborn, data = SD_Police_Census,
## init.theta = 1.514497984, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.9036 -0.8585 -0.2459 0.4551 2.9851
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.133e+00 1.093e+00 1.036 0.300072
## log_tpop 9.926e-01 2.990e-01 3.319 0.000902 ***
## medincome -6.983e-06 2.706e-06 -2.580 0.009876 **
## powner -5.851e-02 8.833e-03 -6.624 3.49e-11 ***
## pdiv 8.719e-02 1.716e-02 5.082 3.74e-07 ***
## psingm -5.775e-03 2.213e-02 -0.261 0.794155
## pnhasn -4.050e-02 7.948e-03 -5.095 3.48e-07 ***
## pnhblk 1.390e-02 8.255e-03 1.684 0.092157 .
## phisp -3.303e-02 4.986e-03 -6.625 3.47e-11 ***
## pfborn 3.389e-02 9.922e-03 3.416 0.000635 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.5145) family taken to be 1)
##
## Null deviance: 582.78 on 290 degrees of freedom
## Residual deviance: 339.35 on 281 degrees of freedom
## AIC: 2481.9
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.514
## Std. Err.: 0.136
##
## 2 x log-likelihood: -2459.918
FINAL ANALYSIS: NB Regression Tests and Collineairty Test
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 log_tpop 0.8849606 1.129994
## 2 medincome 0.2528861 3.954350
## 3 powner 0.2879367 3.472986
## 4 pdiv 0.5842012 1.711739
## 5 psingm 0.5441583 1.837700
## 6 p15_29 0.4523231 2.210809
## 7 pnhasn 0.1900486 5.261812
## 8 phisp 0.1618075 6.180183
## 9 pnhblk 0.7791188 1.283501
## 10 poth 0.7107535 1.406958
## 11 pfborn 0.1633103 6.123313
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept log_tpop medincome
## 1 9.205900636 1.000000 2.121541e-05 2.341769e-05 3.818604e-04
## 2 1.052021069 2.958155 3.317925e-06 3.701128e-06 4.484116e-03
## 3 0.515204788 4.227107 6.227932e-05 5.292357e-05 1.677580e-03
## 4 0.432757522 4.612229 1.041742e-06 2.156525e-06 3.971093e-05
## 5 0.258365124 5.969201 2.692542e-05 2.521029e-05 8.268644e-03
## 6 0.206708462 6.673505 3.734035e-05 3.434045e-05 7.218075e-04
## 7 0.146719981 7.921155 4.487540e-07 1.616851e-06 2.663666e-02
## 8 0.117572920 8.848700 8.528325e-05 7.902653e-05 2.558974e-02
## 9 0.034528302 16.328471 1.779115e-04 3.449449e-04 4.841388e-01
## 10 0.019228452 21.880688 2.275767e-06 1.262869e-04 4.583958e-02
## 11 0.009962863 30.397724 6.027180e-02 7.862544e-02 4.022095e-01
## 12 0.001029882 94.545186 9.393102e-01 9.206809e-01 1.197572e-05
## powner pdiv psingm p15_29 pnhasn
## 1 5.265188e-04 0.0008426351 0.0016901017 7.019165e-04 0.0006300090
## 2 6.340129e-03 0.0003856845 0.0400527183 2.233633e-04 0.0059567900
## 3 1.027375e-02 0.0174823056 0.0009522545 7.782657e-06 0.0986049905
## 4 4.069099e-04 0.0074676565 0.0170132335 3.818509e-05 0.0066542900
## 5 4.472192e-02 0.0042718302 0.0947798552 1.348860e-01 0.0037481331
## 6 4.304160e-03 0.0089566014 0.4465330022 2.304959e-03 0.0038747486
## 7 9.354006e-03 0.3492855483 0.0783646764 4.663472e-03 0.0292821210
## 8 7.423111e-05 0.0447723728 0.2224775134 1.581059e-01 0.0014119199
## 9 7.520783e-01 0.0395155522 0.0076205385 1.253545e-01 0.0560006081
## 10 4.490793e-02 0.0442664661 0.0033975707 2.245043e-02 0.7741958039
## 11 1.078587e-01 0.4716640799 0.0870053252 5.257780e-01 0.0003711023
## 12 1.915352e-02 0.0110892674 0.0001132105 2.548551e-02 0.0192694836
## phisp pnhblk poth pfborn
## 1 0.0004792762 0.0026102956 0.0016367263 0.0003125281
## 2 0.0153797547 0.0641741074 0.0130388277 0.0004771766
## 3 0.0032880613 0.0627846516 0.0026447065 0.0042258340
## 4 0.0176246063 0.6432748199 0.0114643316 0.0077369270
## 5 0.0002904662 0.0465113354 0.0594753231 0.0007984873
## 6 0.0180760198 0.0518545837 0.3447363590 0.0066948113
## 7 0.0423179120 0.0682594179 0.0725516495 0.0002649816
## 8 0.0903823104 0.0008720811 0.4135910490 0.0109343738
## 9 0.0073822380 0.0116315004 0.0001729442 0.0226464829
## 10 0.6707451557 0.0221765707 0.0185182194 0.9136852738
## 11 0.1326132793 0.0254873490 0.0615272625 0.0275210626
## 12 0.0014209199 0.0003632872 0.0006426012 0.0047020611
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 pc_preC 0.7114194 1.405641
## 2 log_tpop 0.8703454 1.148969
## 3 medincome 0.2528426 3.955030
## 4 powner 0.2716987 3.680548
## 5 pdiv 0.5404639 1.850262
## 6 psingm 0.5363831 1.864339
## 7 p15_29 0.4522385 2.211223
## 8 pnhasn 0.1862752 5.368400
## 9 phisp 0.1572325 6.360007
## 10 pnhblk 0.7743294 1.291440
## 11 poth 0.7060833 1.416264
## 12 pfborn 0.1623250 6.160479
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept pc_preC log_tpop
## 1 9.513521660 1.000000 1.980538e-05 0.001816271 2.156980e-05
## 2 1.060339529 2.995354 3.888805e-06 0.012113624 4.333829e-06
## 3 0.795213874 3.458826 1.656151e-07 0.453175867 4.516727e-08
## 4 0.496759505 4.376204 6.092111e-05 0.031703320 5.299274e-05
## 5 0.399924404 4.877325 3.899112e-07 0.086178545 4.780192e-15
## 6 0.231199698 6.414710 1.796928e-05 0.078553201 1.491242e-05
## 7 0.201259893 6.875306 6.597427e-05 0.034407251 5.809931e-05
## 8 0.121248482 8.857935 3.262514e-06 0.222116470 4.535773e-09
## 9 0.117495992 8.998272 9.223094e-05 0.005407860 7.976182e-05
## 10 0.033051642 16.965792 1.820503e-04 0.047151957 2.957422e-04
## 11 0.019112541 22.310610 5.047826e-06 0.006648032 1.665923e-04
## 12 0.009852147 31.074577 6.184540e-02 0.011690210 7.810839e-02
## 13 0.001020636 96.546218 9.377029e-01 0.009037393 9.211976e-01
## medincome powner pdiv psingm p15_29
## 1 3.540506e-04 4.596330e-04 0.0007428041 1.546364e-03 0.0006622889
## 2 4.695780e-03 6.283027e-03 0.0001501502 3.421073e-02 0.0002599731
## 3 2.173677e-05 5.295194e-06 0.0058720214 1.432621e-02 0.0003570616
## 4 2.531039e-03 1.126676e-02 0.0060083204 1.030333e-02 0.0002030710
## 5 8.762154e-04 8.463280e-03 0.0040229186 8.754259e-04 0.0039886338
## 6 4.126066e-03 2.941586e-02 0.0019085046 1.631665e-02 0.1217868669
## 7 7.723625e-04 1.084102e-03 0.0002645497 5.887260e-01 0.0295903253
## 8 5.048408e-02 9.840584e-03 0.4511140398 1.119184e-03 0.0005970539
## 9 1.691051e-02 2.205927e-05 0.0127557122 2.252015e-01 0.1657304506
## 10 4.885562e-01 7.684790e-01 0.0827879264 9.903778e-03 0.1054616549
## 11 3.610404e-02 2.972540e-02 0.0261363349 4.130132e-03 0.0241155693
## 12 3.945648e-01 1.227569e-01 0.3922866748 9.333918e-02 0.5218760429
## 13 3.087989e-06 1.219813e-02 0.0159500428 1.595658e-06 0.0253710078
## pnhasn phisp pnhblk poth pfborn
## 1 0.0005670999 4.336732e-04 2.447342e-03 1.513995e-03 2.883074e-04
## 2 0.0071653514 1.338928e-02 6.213256e-02 1.333097e-02 2.921639e-04
## 3 0.0073135113 3.088147e-03 1.438454e-04 1.751825e-06 1.952839e-03
## 4 0.0720681481 1.012195e-02 1.914665e-01 5.626759e-03 1.106024e-03
## 5 0.0223347849 8.696399e-03 5.677658e-01 8.027471e-03 8.877676e-03
## 6 0.0199748106 6.990435e-05 1.364729e-02 2.301710e-01 5.264222e-03
## 7 0.0001142788 2.820218e-02 6.889345e-02 1.752114e-01 3.051400e-03
## 8 0.0166822045 1.755991e-02 3.216573e-02 3.201933e-02 7.261389e-05
## 9 0.0029751656 1.001737e-01 4.789556e-05 4.500087e-01 1.093586e-02
## 10 0.0481178480 6.411095e-03 1.355489e-02 1.167460e-03 1.693289e-02
## 11 0.7782425561 6.625433e-01 2.506262e-02 1.728106e-02 9.237414e-01
## 12 0.0017394023 1.464169e-01 2.198208e-02 6.454029e-02 2.175189e-02
## 13 0.0227048386 2.893550e-03 6.900821e-04 1.099703e-03 5.732694e-03
##
## Call:
## glm.nb(formula = pcharge ~ log_tpop + medincome + powner + pdiv +
## psingm + p15_29 + pnhasn + phisp + pnhblk + poth + pfborn,
## data = SD_Police_Census, init.theta = 1.342679871, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.2581 -0.7946 -0.2303 0.3760 2.9404
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.539e+00 1.203e+00 1.279 0.20090
## log_tpop 9.868e-01 3.121e-01 3.162 0.00157 **
## medincome -7.231e-06 2.873e-06 -2.517 0.01185 *
## powner -4.851e-02 1.087e-02 -4.463 8.10e-06 ***
## pdiv 9.411e-02 1.903e-02 4.946 7.56e-07 ***
## psingm -2.837e-03 2.395e-02 -0.118 0.90568
## p15_29 9.954e-03 7.325e-03 1.359 0.17420
## pnhasn -3.663e-02 8.455e-03 -4.333 1.47e-05 ***
## phisp -3.339e-02 5.225e-03 -6.391 1.65e-10 ***
## pnhblk 1.499e-02 8.641e-03 1.735 0.08278 .
## poth -3.589e-02 2.412e-02 -1.488 0.13679
## pfborn 3.409e-02 1.066e-02 3.198 0.00138 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(1.3427) family taken to be 1)
##
## Null deviance: 571.71 on 290 degrees of freedom
## Residual deviance: 342.99 on 279 degrees of freedom
## AIC: 2923.3
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 1.343
## Std. Err.: 0.114
##
## 2 x log-likelihood: -2897.268
##
## Call:
## glm.nb(formula = pc_postC ~ pc_preC + log_tpop + medincome +
## powner + pdiv + psingm + p15_29 + pnhasn + phisp + pnhblk +
## poth + pfborn, data = SD_Police_Census, init.theta = 2.312880818,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.2332 -0.7194 -0.0808 0.4922 2.1023
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.589e+00 9.616e-01 1.652 0.098499 .
## pc_preC 1.118e-02 7.924e-04 14.113 < 2e-16 ***
## log_tpop 7.054e-01 2.518e-01 2.802 0.005084 **
## medincome -5.996e-06 2.320e-06 -2.585 0.009748 **
## powner -3.309e-02 8.860e-03 -3.735 0.000187 ***
## pdiv 2.097e-02 1.567e-02 1.338 0.180784
## psingm 2.432e-02 1.916e-02 1.269 0.204331
## p15_29 -2.852e-03 5.795e-03 -0.492 0.622633
## pnhasn -2.573e-02 6.833e-03 -3.765 0.000166 ***
## phisp -2.508e-02 4.256e-03 -5.892 3.82e-09 ***
## pnhblk 1.145e-02 6.876e-03 1.666 0.095732 .
## poth -1.178e-02 1.927e-02 -0.612 0.540848
## pfborn 2.081e-02 8.486e-03 2.453 0.014172 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(2.3129) family taken to be 1)
##
## Null deviance: 835.80 on 290 degrees of freedom
## Residual deviance: 346.87 on 278 degrees of freedom
## AIC: 2383.8
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 2.313
## Std. Err.: 0.229
##
## 2 x log-likelihood: -2355.775
## Waiting for profiling to be done...
## Estimate 2.5 % 97.5 %
## (Intercept) 1.538946e+00 -1.094884e+00 4.196494e+00
## log_tpop 9.867608e-01 3.382991e-01 1.636627e+00
## medincome -7.231196e-06 -1.367974e-05 -6.892811e-07
## powner -4.850840e-02 -7.122388e-02 -2.580712e-02
## pdiv 9.410816e-02 5.425212e-02 1.344242e-01
## psingm -2.837354e-03 -5.014201e-02 4.564343e-02
## p15_29 9.953760e-03 -5.840936e-03 2.616943e-02
## pnhasn -3.663398e-02 -5.351495e-02 -1.977371e-02
## phisp -3.339050e-02 -4.536460e-02 -2.132844e-02
## pnhblk 1.499095e-02 -3.247256e-03 3.459078e-02
## poth -3.589091e-02 -8.526772e-02 1.481759e-02
## pfborn 3.409284e-02 1.128566e-02 5.718825e-02
## Waiting for profiling to be done...
## Estimate 2.5 % 97.5 %
## (Intercept) 1.588650e+00 -0.4232271171 3.614934e+00
## pc_preC 1.118363e-02 0.0087760679 1.379701e-02
## log_tpop 7.054042e-01 0.1967013561 1.215574e+00
## medincome -5.996414e-06 -0.0000109962 -9.541368e-07
## powner -3.309499e-02 -0.0519001372 -1.435727e-02
## pdiv 2.096646e-02 -0.0120648101 5.433279e-02
## psingm 2.431771e-02 -0.0133136716 6.257524e-02
## p15_29 -2.851972e-03 -0.0151011611 9.641314e-03
## pnhasn -2.572914e-02 -0.0393729525 -1.209076e-02
## phisp -2.507871e-02 -0.0343876476 -1.578466e-02
## pnhblk 1.145411e-02 -0.0022116040 2.576766e-02
## poth -1.178374e-02 -0.0499203659 2.699235e-02
## pfborn 2.081419e-02 0.0032206100 3.857960e-02
FINAL Analysis: Predictive Margins
## Average marginal effects
## glm.nb(formula = pc_postC ~ pc_preC + log_tpop + medincome + powner + pdiv + psingm + p15_29 + pnhasn + phisp + pnhblk + poth + pfborn, data = SD_Police_Census, init.theta = 2.312880818, link = log)
## pc_preC log_tpop medincome powner pdiv psingm p15_29 pnhasn phisp pnhblk
## 1.014 63.95 -0.0005436 -3 1.901 2.205 -0.2586 -2.333 -2.274 1.038
## poth pfborn
## -1.068 1.887
## factor AME SE z p lower upper
## log_tpop 63.9518 25.5738 2.5007 0.0124 13.8280 114.0756
## medincome -0.0005 0.0002 -2.3444 0.0191 -0.0010 -0.0001
## p15_29 -0.2586 0.5335 -0.4846 0.6279 -1.3042 0.7871
## pc_preC 1.0139 0.2651 3.8242 0.0001 0.4943 1.5335
## pdiv 1.9008 1.4610 1.3010 0.1932 -0.9627 4.7643
## pfborn 1.8870 0.8434 2.2374 0.0253 0.2340 3.5401
## phisp -2.2736 0.5624 -4.0425 0.0001 -3.3760 -1.1713
## pnhasn -2.3326 0.7512 -3.1051 0.0019 -3.8050 -0.8602
## pnhblk 1.0384 0.6621 1.5685 0.1168 -0.2592 2.3360
## poth -1.0683 1.7442 -0.6125 0.5402 -4.4868 2.3502
## powner -3.0004 0.9962 -3.0119 0.0026 -4.9529 -1.0479
## psingm 2.2046 1.7807 1.2381 0.2157 -1.2855 5.6948
FINAL Analysis: Creating a Bivariate Correlation Matrix of all Independent Variables
FINAL Analysis: Analysis of the Connection between Percent Foreign Born and Hispanics and Asians
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
FINAL Analysis: Making Maps of San Diego City for all Independent and Dependent Variables