Introduction

Suicide in the US is a major public health issue. In 2020, there were more than 45,000 recorded suicides. Significant research has gone into understanding the risk and protective factors associated with suicide. In this assignment, we will use publicly available data to examine suicide rates by US county.

Each county in the US has an identifying 5-digit code. For instance, Autauga, Alabama has the code 01001. This county usually appears first alphabetically. This is the “key” we will use to merge our datafiles together.

Our goal is to determine which variables best predict county-level suicide of the following: population density (the number of people / sq mile of land area), income, percent of people who identify as white, and the percentage of people who live alone.

Previous research has shown that rurality is associated with suicide, we might predict that income affects suicide (although different hypotheses might predict different directions), we know that suicidality is patterned by ethnic category. People who identify as white or those who identify as Native American have higher rates of suicide than other ethnic groups in the US. We hypothesize that living alone might contribute to suicide.

Load Packages

library(readxl)

library(tidyverse)
library(dplyr)
library(dslabs)

Data Munging

We will use the following datasets:

Step 1 Load files

# Load .txt file
CDC_suicide_data <- read.table("CDC suicide data 2010 through 2020.txt", header = TRUE, sep = "\t", stringsAsFactors = FALSE)

# Load .csv files
USCensusIncome <- read.csv("USCensusIncome5Y2020.csv", stringsAsFactors = FALSE)
USCensusHousehold <- read.csv("USCensusHousehold5Y2020.csv", stringsAsFactors = FALSE)
USCensusDemographic <- read.csv("USCensusDemographic5Y2020.csv", stringsAsFactors = FALSE)

# Load .xls file
USCensusBureau_LandArea <- read_excel("USCensusBureau Land Area.xls")

Step 2: Data Munging

Eventually we will merge the dataframes together. Before we do so, we will identify or create the columns of interest. We will likely find it easier to rename some columns to something easier to work with as well.

First, we determine the suicide rates by US county by using CDC_suicide_data. It has data on the number of suicides in each county for the 10 year period 2010 – 2020. If the number of suicides is less than 20, the data states that the crude rate is “Unreliable”. If the number of suicides is less than 10, then the actual number is “Suppressed”.

head(CDC_suicide_data)
##               County County.Code Deaths Population Crude.Rate
## 1 Autauga County, AL        1001    115     609875       18.9
## 2 Baldwin County, AL        1003    444    2250866       19.7
## 3 Barbour County, AL        1005     41     287620       14.3
## 4    Bibb County, AL        1007     38     248120       15.3
## 5  Blount County, AL        1009    122     635351       19.2
## 6 Bullock County, AL        1011     11     114915 Unreliable

If the Crude.Rate equals “Unreliable”, then we need to manually calculate it. This equation is Deaths / Population x 100,000.

# Recalculate Crude.Rate where it is "Unreliable"
CDC_suicide_data <- CDC_suicide_data %>%
  mutate(Crude.Rate = ifelse(Crude.Rate == "Unreliable", as.numeric(Deaths) / as.numeric(Population) * 100000, as.numeric(Crude.Rate)))

head(CDC_suicide_data)
##               County County.Code Deaths Population Crude.Rate
## 1 Autauga County, AL        1001    115     609875  18.900000
## 2 Baldwin County, AL        1003    444    2250866  19.700000
## 3 Barbour County, AL        1005     41     287620  14.300000
## 4    Bibb County, AL        1007     38     248120  15.300000
## 5  Blount County, AL        1009    122     635351  19.200000
## 6 Bullock County, AL        1011     11     114915   9.572293

Unfortunately, the “key” or county code varies a bit from dataset to dataset. How can we manage these so that we will be able to merge the files together? We merge by County.Code but most of the dataframes use the column name Geography so we change the name to Geography. This column will also need to be character class.

CDC_suicide_data <- CDC_suicide_data %>%
  mutate(County.Code = as.character(County.Code)) %>%
  rename(Geography = County.Code)

head(CDC_suicide_data)
##               County Geography Deaths Population Crude.Rate
## 1 Autauga County, AL      1001    115     609875  18.900000
## 2 Baldwin County, AL      1003    444    2250866  19.700000
## 3 Barbour County, AL      1005     41     287620  14.300000
## 4    Bibb County, AL      1007     38     248120  15.300000
## 5  Blount County, AL      1009    122     635351  19.200000
## 6 Bullock County, AL      1011     11     114915   9.572293

Geography needs to be a 5 digit number.

# Ensure Geography in CDC_suicide_data has a consistent 5-digit format
CDC_suicide_data <- CDC_suicide_data %>%
  mutate(Geography = stringr::str_pad(Geography, width = 5, pad = "0"))
head(CDC_suicide_data)
##               County Geography Deaths Population Crude.Rate
## 1 Autauga County, AL     01001    115     609875  18.900000
## 2 Baldwin County, AL     01003    444    2250866  19.700000
## 3 Barbour County, AL     01005     41     287620  14.300000
## 4    Bibb County, AL     01007     38     248120  15.300000
## 5  Blount County, AL     01009    122     635351  19.200000
## 6 Bullock County, AL     01011     11     114915   9.572293

Next, we need to identify the needed data about the following variables:

  1. population density (the number of people / sq mile of land area)

  2. income

  3. percent of people who identify as white

  4. percentage of people who live alone.

1. Population Density

USCensusBureau_LandArea has information on the land area of each county is square miles. The variable we are interested in is: LND_SQMI. This will be useful for finding population density.

head(USCensusBureau_LandArea)
## # A tibble: 6 × 3
##   Areaname      STCOU LND_SQMI
##   <chr>         <chr>    <dbl>
## 1 UNITED STATES 00000 3787425.
## 2 ALABAMA       01000   52423.
## 3 Autauga, AL   01001     604.
## 4 Baldwin, AL   01003    2027.
## 5 Barbour, AL   01005     905.
## 6 Bibb, AL      01007     626.

We select columns STCOU, LND_SQMI, and County.Name.

# Select columns in USCensusBureau_LandArea
USCensusBureau_LandArea_select <- USCensusBureau_LandArea %>%
  select(STCOU, LND_SQMI )

# Rename 'STCOU' to 'Geography'
USCensusBureau_LandArea_select <- rename(USCensusBureau_LandArea_select, Geography = STCOU)

head(USCensusBureau_LandArea_select)
## # A tibble: 6 × 2
##   Geography LND_SQMI
##   <chr>        <dbl>
## 1 00000     3787425.
## 2 01000       52423.
## 3 01001         604.
## 4 01003        2027.
## 5 01005         905.
## 6 01007         626.

We join the USCensusBureau_LandArea_select dataframe to the CDC_suicide_data dataframe using County.Name.

# Join the dataframes on 'Geography'
suicide_data <- left_join(CDC_suicide_data, USCensusBureau_LandArea_select, by = "Geography")
head(suicide_data)
##               County Geography Deaths Population Crude.Rate LND_SQMI
## 1 Autauga County, AL     01001    115     609875  18.900000   604.49
## 2 Baldwin County, AL     01003    444    2250866  19.700000  2027.08
## 3 Barbour County, AL     01005     41     287620  14.300000   904.59
## 4    Bibb County, AL     01007     38     248120  15.300000   625.50
## 5  Blount County, AL     01009    122     635351  19.200000   650.65
## 6 Bullock County, AL     01011     11     114915   9.572293   626.11

Then, we create a new column population.density in CDC_suicide_data by dividing Population by LND_SQMI. We need to make sure that population.density is not Inf. We do this by including an ifelse function when population.density is created so that it is missing if land area is 0.

# Create the 'population.density' column
suicide_data$population.density <- ifelse(suicide_data$LND_SQMI == 0,
                                          NA,as.numeric(suicide_data$Population) / suicide_data$LND_SQMI)
## Warning in ifelse(suicide_data$LND_SQMI == 0, NA,
## as.numeric(suicide_data$Population)/suicide_data$LND_SQMI): NAs introduced by
## coercion
head(suicide_data)
##               County Geography Deaths Population Crude.Rate LND_SQMI
## 1 Autauga County, AL     01001    115     609875  18.900000   604.49
## 2 Baldwin County, AL     01003    444    2250866  19.700000  2027.08
## 3 Barbour County, AL     01005     41     287620  14.300000   904.59
## 4    Bibb County, AL     01007     38     248120  15.300000   625.50
## 5  Blount County, AL     01009    122     635351  19.200000   650.65
## 6 Bullock County, AL     01011     11     114915   9.572293   626.11
##   population.density
## 1          1008.9083
## 2          1110.3982
## 3           317.9562
## 4           396.6747
## 5           976.4866
## 6           183.5380

2. Income

USCensusIncome as information on income from American Community Survey run by the US Census bureau. This data is a 5-year estimate of income. The column: Estimate..Households..Median.income..dollars. is likely the one we will want to know.

head(USCensusIncome)
##        Geography    Geographic.Area.Name Estimate..Households..Total
## 1 0500000US01001 Autauga County, Alabama                       21559
## 2 0500000US01003 Baldwin County, Alabama                       84047
## 3 0500000US01005 Barbour County, Alabama                        9322
## 4 0500000US01007    Bibb County, Alabama                        7259
## 5 0500000US01009  Blount County, Alabama                       21205
## 6 0500000US01011 Bullock County, Alabama                        3429
##   Margin.of.Error..Households..Total
## 1                                366
## 2                               1143
## 3                                338
## 4                                299
## 5                                430
## 6                                195
##   Estimate..Households..Total..Less.than..10.000
## 1                                            6.2
## 2                                            5.2
## 3                                           14.6
## 4                                           11.0
## 5                                           10.1
## 6                                           18.2
##   Margin.of.Error..Households..Total..Less.than..10.000
## 1                                                   1.4
## 2                                                   1.0
## 3                                                   2.6
## 4                                                   3.3
## 5                                                   2.0
## 6                                                   4.6
##   Estimate..Households..Total...10.000.to..14.999
## 1                                             4.6
## 2                                             4.8
## 3                                             7.6
## 4                                             7.1
## 5                                             4.6
## 6                                             9.8
##   Margin.of.Error..Households..Total...10.000.to..14.999
## 1                                                    1.2
## 2                                                    0.7
## 3                                                    1.5
## 4                                                    2.8
## 5                                                    1.0
## 6                                                    5.0
##   Estimate..Households..Total...15.000.to..24.999
## 1                                            12.3
## 2                                             7.7
## 3                                            18.4
## 4                                            10.5
## 5                                            11.0
## 6                                            11.9
##   Margin.of.Error..Households..Total...15.000.to..24.999
## 1                                                    2.0
## 2                                                    0.8
## 3                                                    2.2
## 4                                                    2.7
## 5                                                    1.9
## 6                                                    4.6
##   Estimate..Households..Total...25.000.to..34.999
## 1                                             8.5
## 2                                            10.0
## 3                                             9.4
## 4                                             9.1
## 5                                            11.2
## 6                                            10.6
##   Margin.of.Error..Households..Total...25.000.to..34.999
## 1                                                    1.7
## 2                                                    1.1
## 3                                                    1.7
## 4                                                    2.7
## 5                                                    1.7
## 6                                                    4.0
##   Estimate..Households..Total...35.000.to..49.999
## 1                                            12.7
## 2                                            14.0
## 3                                            12.5
## 4                                            11.2
## 5                                            14.5
## 6                                             8.0
##   Margin.of.Error..Households..Total...35.000.to..49.999
## 1                                                    1.9
## 2                                                    1.4
## 3                                                    1.9
## 4                                                    3.0
## 5                                                    1.9
## 6                                                    3.9
##   Estimate..Households..Total...50.000.to..74.999
## 1                                            17.0
## 2                                            16.8
## 3                                            16.3
## 4                                            19.4
## 5                                            17.9
## 6                                            17.4
##   Margin.of.Error..Households..Total...50.000.to..74.999
## 1                                                    2.0
## 2                                                    1.4
## 3                                                    2.9
## 4                                                    3.9
## 5                                                    2.2
## 6                                                    5.3
##   Estimate..Households..Total...75.000.to..99.999
## 1                                            13.4
## 2                                            13.7
## 3                                             7.3
## 4                                            15.6
## 5                                            10.8
## 6                                             7.5
##   Margin.of.Error..Households..Total...75.000.to..99.999
## 1                                                    2.3
## 2                                                    1.2
## 3                                                    1.6
## 4                                                    3.7
## 5                                                    1.5
## 6                                                    2.9
##   Estimate..Households..Total...100.000.to..149.999
## 1                                              16.4
## 2                                              15.5
## 3                                               9.1
## 4                                              11.2
## 5                                              12.4
## 6                                              12.4
##   Margin.of.Error..Households..Total...100.000.to..149.999
## 1                                                      2.3
## 2                                                      1.0
## 3                                                      2.0
## 4                                                      2.5
## 5                                                      1.7
## 6                                                      4.1
##   Estimate..Households..Total...150.000.to..199.999
## 1                                               4.8
## 2                                               5.8
## 3                                               2.2
## 4                                               2.8
## 5                                               4.9
## 6                                               1.3
##   Margin.of.Error..Households..Total...150.000.to..199.999
## 1                                                      1.3
## 2                                                      0.7
## 3                                                      0.8
## 4                                                      1.5
## 5                                                      1.0
## 6                                                      2.0
##   Estimate..Households..Total...200.000.or.more
## 1                                           4.2
## 2                                           6.6
## 3                                           2.6
## 4                                           2.2
## 5                                           2.7
## 6                                           2.8
##   Margin.of.Error..Households..Total...200.000.or.more
## 1                                                  1.2
## 2                                                  0.9
## 3                                                  1.2
## 4                                                  1.3
## 5                                                  0.8
## 6                                                  1.8
##   Estimate..Households..Median.income..dollars.
## 1                                         57982
## 2                                         61756
## 3                                         34990
## 4                                         51721
## 5                                         48922
## 6                                         33866
##   Margin.of.Error..Households..Median.income..dollars.
## 1                                                 4839
## 2                                                 2268
## 3                                                 2909
## 4                                                 6237
## 5                                                 2269
## 6                                                10094
##   Estimate..Households..Mean.income..dollars.
## 1                                       75614
## 2                                       83626
## 3                                       51557
## 4                                       61655
## 5                                       66360
## 6                                       50664
##   Margin.of.Error..Households..Mean.income..dollars.
## 1                                               5718
## 2                                               2634
## 3                                               4229
## 4                                               5787
## 5                                               3864
## 6                                               5359

Let’s remove “0500000US” off the Geography column.

# Remove "0500000US" from the 'Geography' column in USCensusIncome
USCensusIncome$Geography <- gsub("0500000US", "", USCensusIncome$Geography)

head(USCensusIncome)
##   Geography    Geographic.Area.Name Estimate..Households..Total
## 1     01001 Autauga County, Alabama                       21559
## 2     01003 Baldwin County, Alabama                       84047
## 3     01005 Barbour County, Alabama                        9322
## 4     01007    Bibb County, Alabama                        7259
## 5     01009  Blount County, Alabama                       21205
## 6     01011 Bullock County, Alabama                        3429
##   Margin.of.Error..Households..Total
## 1                                366
## 2                               1143
## 3                                338
## 4                                299
## 5                                430
## 6                                195
##   Estimate..Households..Total..Less.than..10.000
## 1                                            6.2
## 2                                            5.2
## 3                                           14.6
## 4                                           11.0
## 5                                           10.1
## 6                                           18.2
##   Margin.of.Error..Households..Total..Less.than..10.000
## 1                                                   1.4
## 2                                                   1.0
## 3                                                   2.6
## 4                                                   3.3
## 5                                                   2.0
## 6                                                   4.6
##   Estimate..Households..Total...10.000.to..14.999
## 1                                             4.6
## 2                                             4.8
## 3                                             7.6
## 4                                             7.1
## 5                                             4.6
## 6                                             9.8
##   Margin.of.Error..Households..Total...10.000.to..14.999
## 1                                                    1.2
## 2                                                    0.7
## 3                                                    1.5
## 4                                                    2.8
## 5                                                    1.0
## 6                                                    5.0
##   Estimate..Households..Total...15.000.to..24.999
## 1                                            12.3
## 2                                             7.7
## 3                                            18.4
## 4                                            10.5
## 5                                            11.0
## 6                                            11.9
##   Margin.of.Error..Households..Total...15.000.to..24.999
## 1                                                    2.0
## 2                                                    0.8
## 3                                                    2.2
## 4                                                    2.7
## 5                                                    1.9
## 6                                                    4.6
##   Estimate..Households..Total...25.000.to..34.999
## 1                                             8.5
## 2                                            10.0
## 3                                             9.4
## 4                                             9.1
## 5                                            11.2
## 6                                            10.6
##   Margin.of.Error..Households..Total...25.000.to..34.999
## 1                                                    1.7
## 2                                                    1.1
## 3                                                    1.7
## 4                                                    2.7
## 5                                                    1.7
## 6                                                    4.0
##   Estimate..Households..Total...35.000.to..49.999
## 1                                            12.7
## 2                                            14.0
## 3                                            12.5
## 4                                            11.2
## 5                                            14.5
## 6                                             8.0
##   Margin.of.Error..Households..Total...35.000.to..49.999
## 1                                                    1.9
## 2                                                    1.4
## 3                                                    1.9
## 4                                                    3.0
## 5                                                    1.9
## 6                                                    3.9
##   Estimate..Households..Total...50.000.to..74.999
## 1                                            17.0
## 2                                            16.8
## 3                                            16.3
## 4                                            19.4
## 5                                            17.9
## 6                                            17.4
##   Margin.of.Error..Households..Total...50.000.to..74.999
## 1                                                    2.0
## 2                                                    1.4
## 3                                                    2.9
## 4                                                    3.9
## 5                                                    2.2
## 6                                                    5.3
##   Estimate..Households..Total...75.000.to..99.999
## 1                                            13.4
## 2                                            13.7
## 3                                             7.3
## 4                                            15.6
## 5                                            10.8
## 6                                             7.5
##   Margin.of.Error..Households..Total...75.000.to..99.999
## 1                                                    2.3
## 2                                                    1.2
## 3                                                    1.6
## 4                                                    3.7
## 5                                                    1.5
## 6                                                    2.9
##   Estimate..Households..Total...100.000.to..149.999
## 1                                              16.4
## 2                                              15.5
## 3                                               9.1
## 4                                              11.2
## 5                                              12.4
## 6                                              12.4
##   Margin.of.Error..Households..Total...100.000.to..149.999
## 1                                                      2.3
## 2                                                      1.0
## 3                                                      2.0
## 4                                                      2.5
## 5                                                      1.7
## 6                                                      4.1
##   Estimate..Households..Total...150.000.to..199.999
## 1                                               4.8
## 2                                               5.8
## 3                                               2.2
## 4                                               2.8
## 5                                               4.9
## 6                                               1.3
##   Margin.of.Error..Households..Total...150.000.to..199.999
## 1                                                      1.3
## 2                                                      0.7
## 3                                                      0.8
## 4                                                      1.5
## 5                                                      1.0
## 6                                                      2.0
##   Estimate..Households..Total...200.000.or.more
## 1                                           4.2
## 2                                           6.6
## 3                                           2.6
## 4                                           2.2
## 5                                           2.7
## 6                                           2.8
##   Margin.of.Error..Households..Total...200.000.or.more
## 1                                                  1.2
## 2                                                  0.9
## 3                                                  1.2
## 4                                                  1.3
## 5                                                  0.8
## 6                                                  1.8
##   Estimate..Households..Median.income..dollars.
## 1                                         57982
## 2                                         61756
## 3                                         34990
## 4                                         51721
## 5                                         48922
## 6                                         33866
##   Margin.of.Error..Households..Median.income..dollars.
## 1                                                 4839
## 2                                                 2268
## 3                                                 2909
## 4                                                 6237
## 5                                                 2269
## 6                                                10094
##   Estimate..Households..Mean.income..dollars.
## 1                                       75614
## 2                                       83626
## 3                                       51557
## 4                                       61655
## 5                                       66360
## 6                                       50664
##   Margin.of.Error..Households..Mean.income..dollars.
## 1                                               5718
## 2                                               2634
## 3                                               4229
## 4                                               5787
## 5                                               3864
## 6                                               5359

We select columns Geography and Estimate..Households..Median.income..dollars. and name a new dataframe called USCensusIncome_select.

# Select columns and create a new dataframe called USCensusIncome_select
USCensusIncome_select <- USCensusIncome %>%
  select(Geography, Estimate..Households..Median.income..dollars.)

head(USCensusIncome_select)
##   Geography Estimate..Households..Median.income..dollars.
## 1     01001                                         57982
## 2     01003                                         61756
## 3     01005                                         34990
## 4     01007                                         51721
## 5     01009                                         48922
## 6     01011                                         33866
# Rename column in USCensusIncome_select
USCensusIncome_select <- USCensusIncome_select %>%
  rename(Median.income = Estimate..Households..Median.income..dollars.)

head(USCensusIncome_select)
##   Geography Median.income
## 1     01001         57982
## 2     01003         61756
## 3     01005         34990
## 4     01007         51721
## 5     01009         48922
## 6     01011         33866

Geography are both columns that match in suicide_data and USCensusIncome_select. Let’s join these dataframes.

# Join the dataframes on 'Geography'
suicide_data <- left_join(suicide_data, USCensusIncome_select, by = "Geography")

head(suicide_data)
##               County Geography Deaths Population Crude.Rate LND_SQMI
## 1 Autauga County, AL     01001    115     609875  18.900000   604.49
## 2 Baldwin County, AL     01003    444    2250866  19.700000  2027.08
## 3 Barbour County, AL     01005     41     287620  14.300000   904.59
## 4    Bibb County, AL     01007     38     248120  15.300000   625.50
## 5  Blount County, AL     01009    122     635351  19.200000   650.65
## 6 Bullock County, AL     01011     11     114915   9.572293   626.11
##   population.density Median.income
## 1          1008.9083         57982
## 2          1110.3982         61756
## 3           317.9562         34990
## 4           396.6747         51721
## 5           976.4866         48922
## 6           183.5380         33866

3. percent of people who identify as white

USCensusDemographic has information on ethnic identification by county.

head(USCensusDemographic)
##        Geography    Geographic.Area.Name
## 1 0500000US01001 Autauga County, Alabama
## 2 0500000US01003 Baldwin County, Alabama
## 3 0500000US01005 Barbour County, Alabama
## 4 0500000US01007    Bibb County, Alabama
## 5 0500000US01009  Blount County, Alabama
## 6 0500000US01011 Bullock County, Alabama
##   Estimate..SEX.AND.AGE..Total.population
## 1                                   55639
## 2                                  218289
## 3                                   25026
## 4                                   22374
## 5                                   57755
## 6                                   10173
##   Estimate..RACE..Total.population..One.race
## 1                                      54218
## 2                                     212612
## 3                                      24504
## 4                                      22260
## 5                                      56462
## 6                                      10098
##   Margin.of.Error..RACE..Total.population..One.race
## 1                                               397
## 2                                              1040
## 3                                               176
## 4                                                84
## 5                                               289
## 6                                                80
##   Estimate..RACE..Total.population..Two.or.more.races
## 1                                                1421
## 2                                                5677
## 3                                                 522
## 4                                                 114
## 5                                                1293
## 6                                                  75
##   Margin.of.Error..RACE..Total.population..Two.or.more.races
## 1                                                        397
## 2                                                       1040
## 3                                                        176
## 4                                                         84
## 5                                                        289
## 6                                                         80
##   Estimate..RACE..Total.population..One.race.1
## 1                                        54218
## 2                                       212612
## 3                                        24504
## 4                                        22260
## 5                                        56462
## 6                                        10098
##   Margin.of.Error..RACE..Total.population..One.race.1
## 1                                                 397
## 2                                                1040
## 3                                                 176
## 4                                                  84
## 5                                                 289
## 6                                                  80
##   Estimate..RACE..Total.population..One.race..White
## 1                                             42150
## 2                                            186504
## 3                                             11587
## 4                                             17138
## 5                                             54271
## 6                                              2663
##   Margin.of.Error..RACE..Total.population..One.race..White
## 1                                                      207
## 2                                                     1173
## 3                                                      160
## 4                                                       95
## 5                                                      537
## 6                                                      324
##   Estimate..RACE..Total.population..One.race..Black.or.African.American
## 1                                                                 10866
## 2                                                                 19153
## 3                                                                 11929
## 4                                                                  5045
## 5                                                                   808
## 6                                                                  6980
##   Margin.of.Error..RACE..Total.population..One.race..Black.or.African.American
## 1                                                                          347
## 2                                                                          728
## 3                                                                          183
## 4                                                                          142
## 5                                                                          173
## 6                                                                          140
##   Estimate..RACE..Total.population..One.race..American.Indian.and.Alaska.Native
## 1                                                                           155
## 2                                                                          1514
## 3                                                                            88
## 4                                                                            12
## 5                                                                            55
## 6                                                                             0
##   Margin.of.Error..RACE..Total.population..One.race..American.Indian.and.Alaska.Native
## 1                                                                                  102
## 2                                                                                  418
## 3                                                                                   65
## 4                                                                                   25
## 5                                                                                   47
## 6                                                                                   19
##   Estimate..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Cherokee.tribal.grouping
## 1                                                                                                     113
## 2                                                                                                     292
## 3                                                                                                       7
## 4                                                                                                       2
## 5                                                                                                      29
## 6                                                                                                       0
##   Margin.of.Error..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Cherokee.tribal.grouping
## 1                                                                                                            101
## 2                                                                                                            233
## 3                                                                                                             13
## 4                                                                                                             17
## 5                                                                                                             31
## 6                                                                                                             19
##   Margin.of.Error..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Chippewa.tribal.grouping
## 1                                                                                                             29
## 2                                                                                                             29
## 3                                                                                                             23
## 4                                                                                                             23
## 5                                                                                                             29
## 6                                                                                                             19
##   Estimate..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Navajo.tribal.grouping
## 1                                                                                                     0
## 2                                                                                                    53
## 3                                                                                                     7
## 4                                                                                                     0
## 5                                                                                                     0
## 6                                                                                                     0
##   Margin.of.Error..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Navajo.tribal.grouping
## 1                                                                                                           29
## 2                                                                                                          100
## 3                                                                                                           12
## 4                                                                                                           23
## 5                                                                                                           29
## 6                                                                                                           19
##   Estimate..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Sioux.tribal.grouping
## 1                                                                                                   10
## 2                                                                                                    0
## 3                                                                                                    0
## 4                                                                                                    0
## 5                                                                                                    0
## 6                                                                                                    0
##   Margin.of.Error..RACE..Total.population..One.race..American.Indian.and.Alaska.Native..Sioux.tribal.grouping
## 1                                                                                                          17
## 2                                                                                                          29
## 3                                                                                                          23
## 4                                                                                                          23
## 5                                                                                                          29
## 6                                                                                                          19
##   Estimate..RACE..Total.population..One.race..Asian
## 1                                               649
## 2                                              2033
## 3                                               122
## 4                                                56
## 5                                               236
## 6                                               137
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian
## 1                                                            null
## 2                                                            null
## 3                                                            null
## 4                                                            null
## 5                                                            null
## 6                                                            null
##   Margin.of.Error..RACE..Total.population..One.race..Asian
## 1                                                      174
## 2                                                      352
## 3                                                       25
## 4                                                       81
## 5                                                       41
## 6                                                      117
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian
## 1                                                                   null
## 2                                                                   null
## 3                                                                   null
## 4                                                                   null
## 5                                                                   null
## 6                                                                   null
##   Estimate..RACE..Total.population..One.race..Asian..Asian.Indian
## 1                                                              11
## 2                                                             469
## 3                                                              65
## 4                                                              56
## 5                                                              65
## 6                                                               0
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Asian.Indian
## 1                                                                     23
## 2                                                                    367
## 3                                                                     61
## 4                                                                     81
## 5                                                                     80
## 6                                                                     19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Asian.Indian
## 1                                                                                 null
## 2                                                                                 null
## 3                                                                                 null
## 4                                                                                 null
## 5                                                                                 null
## 6                                                                                 null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Asian.Indian
## 1                                                                          null
## 2                                                                          null
## 3                                                                          null
## 4                                                                          null
## 5                                                                          null
## 6                                                                          null
##   Estimate..RACE..Total.population..One.race..Asian..Chinese
## 1                                                         28
## 2                                                        595
## 3                                                          0
## 4                                                          0
## 5                                                         84
## 6                                                         56
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Chinese
## 1                                                                     null
## 2                                                                     null
## 3                                                                     null
## 4                                                                     null
## 5                                                                     null
## 6                                                                     null
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Chinese
## 1                                                                58
## 2                                                               358
## 3                                                                23
## 4                                                                23
## 5                                                                67
## 6                                                                99
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Chinese
## 1                                                                            null
## 2                                                                            null
## 3                                                                            null
## 4                                                                            null
## 5                                                                            null
## 6                                                                            null
##   Estimate..RACE..Total.population..One.race..Asian..Filipino
## 1                                                         203
## 2                                                         131
## 3                                                           2
## 4                                                           0
## 5                                                          28
## 6                                                           0
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Filipino
## 1                                                                140
## 2                                                                 90
## 3                                                                  4
## 4                                                                 23
## 5                                                                 34
## 6                                                                 19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Filipino
## 1                                                                             null
## 2                                                                             null
## 3                                                                             null
## 4                                                                             null
## 5                                                                             null
## 6                                                                             null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Filipino
## 1                                                                      null
## 2                                                                      null
## 3                                                                      null
## 4                                                                      null
## 5                                                                      null
## 6                                                                      null
##   Estimate..RACE..Total.population..One.race..Asian..Japanese
## 1                                                          82
## 2                                                         331
## 3                                                           5
## 4                                                           0
## 5                                                          14
## 6                                                           0
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Japanese
## 1                                                                 95
## 2                                                                200
## 3                                                                  9
## 4                                                                 23
## 5                                                                 20
## 6                                                                 19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Japanese
## 1                                                                             null
## 2                                                                             null
## 3                                                                             null
## 4                                                                             null
## 5                                                                             null
## 6                                                                             null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Japanese
## 1                                                                      null
## 2                                                                      null
## 3                                                                      null
## 4                                                                      null
## 5                                                                      null
## 6                                                                      null
##   Estimate..RACE..Total.population..One.race..Asian..Korean
## 1                                                       200
## 2                                                       112
## 3                                                        14
## 4                                                         0
## 5                                                        45
## 6                                                         0
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Korean
## 1                                                                    null
## 2                                                                    null
## 3                                                                    null
## 4                                                                    null
## 5                                                                    null
## 6                                                                    null
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Korean
## 1                                                              220
## 2                                                              133
## 3                                                               28
## 4                                                               23
## 5                                                               56
## 6                                                               19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Korean
## 1                                                                           null
## 2                                                                           null
## 3                                                                           null
## 4                                                                           null
## 5                                                                           null
## 6                                                                           null
##   Estimate..RACE..Total.population..One.race..Asian..Vietnamese
## 1                                                           112
## 2                                                           173
## 3                                                            15
## 4                                                             0
## 5                                                             0
## 6                                                             0
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Vietnamese
## 1                                                                  160
## 2                                                                  178
## 3                                                                   22
## 4                                                                   23
## 5                                                                   29
## 6                                                                   19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Vietnamese
## 1                                                                               null
## 2                                                                               null
## 3                                                                               null
## 4                                                                               null
## 5                                                                               null
## 6                                                                               null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Vietnamese
## 1                                                                        null
## 2                                                                        null
## 3                                                                        null
## 4                                                                        null
## 5                                                                        null
## 6                                                                        null
##   Estimate..RACE..Total.population..One.race..Asian..Other.Asian
## 1                                                             13
## 2                                                            222
## 3                                                             21
## 4                                                              0
## 5                                                              0
## 6                                                             81
##   Margin.of.Error..RACE..Total.population..One.race..Asian..Other.Asian
## 1                                                                    22
## 2                                                                   204
## 3                                                                    42
## 4                                                                    23
## 5                                                                    29
## 6                                                                    70
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Asian..Other.Asian
## 1                                                                                null
## 2                                                                                null
## 3                                                                                null
## 4                                                                                null
## 5                                                                                null
## 6                                                                                null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Asian..Other.Asian
## 1                                                                         null
## 2                                                                         null
## 3                                                                         null
## 4                                                                         null
## 5                                                                         null
## 6                                                                         null
##   Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander
## 1                                                                                     24
## 2                                                                                     10
## 3                                                                                      1
## 4                                                                                      0
## 5                                                                                     55
## 6                                                                                      0
##   Annotation.of.Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander
## 1                                                                                                 null
## 2                                                                                                 null
## 3                                                                                                 null
## 4                                                                                                 null
## 5                                                                                                 null
## 6                                                                                                 null
##   Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander
## 1                                                                                            37
## 2                                                                                            16
## 3                                                                                             2
## 4                                                                                            23
## 5                                                                                            60
## 6                                                                                            19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander
## 1                                                                                                        null
## 2                                                                                                        null
## 3                                                                                                        null
## 4                                                                                                        null
## 5                                                                                                        null
## 6                                                                                                        null
##   Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Native.Hawaiian
## 1                                                                                                       0
## 2                                                                                                       0
## 3                                                                                                       1
## 4                                                                                                       0
## 5                                                                                                      28
## 6                                                                                                       0
##   Annotation.of.Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Native.Hawaiian
## 1                                                                                                                  null
## 2                                                                                                                  null
## 3                                                                                                                  null
## 4                                                                                                                  null
## 5                                                                                                                  null
## 6                                                                                                                  null
##   Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Native.Hawaiian
## 1                                                                                                             29
## 2                                                                                                             29
## 3                                                                                                              2
## 4                                                                                                             23
## 5                                                                                                             48
## 6                                                                                                             19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Native.Hawaiian
## 1                                                                                                                         null
## 2                                                                                                                         null
## 3                                                                                                                         null
## 4                                                                                                                         null
## 5                                                                                                                         null
## 6                                                                                                                         null
##   Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Chamorro
## 1                                                                                               24
## 2                                                                                               10
## 3                                                                                                0
## 4                                                                                                0
## 5                                                                                               27
## 6                                                                                                0
##   Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Chamorro
## 1                                                                                                      37
## 2                                                                                                      16
## 3                                                                                                      23
## 4                                                                                                      23
## 5                                                                                                      42
## 6                                                                                                      19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Chamorro
## 1                                                                                                                  null
## 2                                                                                                                  null
## 3                                                                                                                  null
## 4                                                                                                                  null
## 5                                                                                                                  null
## 6                                                                                                                  null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Chamorro
## 1                                                                                                           null
## 2                                                                                                           null
## 3                                                                                                           null
## 4                                                                                                           null
## 5                                                                                                           null
## 6                                                                                                           null
##   Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Samoan
## 1                                                                                              0
## 2                                                                                              0
## 3                                                                                              0
## 4                                                                                              0
## 5                                                                                              0
## 6                                                                                              0
##   Annotation.of.Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Samoan
## 1                                                                                                         null
## 2                                                                                                         null
## 3                                                                                                         null
## 4                                                                                                         null
## 5                                                                                                         null
## 6                                                                                                         null
##   Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Samoan
## 1                                                                                                    29
## 2                                                                                                    29
## 3                                                                                                    23
## 4                                                                                                    23
## 5                                                                                                    29
## 6                                                                                                    19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Samoan
## 1                                                                                                                null
## 2                                                                                                                null
## 3                                                                                                                null
## 4                                                                                                                null
## 5                                                                                                                null
## 6                                                                                                                null
##   Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Other.Pacific.Islander
## 1                                                                                                              0
## 2                                                                                                              0
## 3                                                                                                              0
## 4                                                                                                              0
## 5                                                                                                              0
## 6                                                                                                              0
##   Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Other.Pacific.Islander
## 1                                                                                                                    29
## 2                                                                                                                    29
## 3                                                                                                                    23
## 4                                                                                                                    23
## 5                                                                                                                    29
## 6                                                                                                                    19
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Other.Pacific.Islander
## 1                                                                                                                                null
## 2                                                                                                                                null
## 3                                                                                                                                null
## 4                                                                                                                                null
## 5                                                                                                                                null
## 6                                                                                                                                null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Native.Hawaiian.and.Other.Pacific.Islander..Other.Pacific.Islander
## 1                                                                                                                         null
## 2                                                                                                                         null
## 3                                                                                                                         null
## 4                                                                                                                         null
## 5                                                                                                                         null
## 6                                                                                                                         null
##   Estimate..RACE..Total.population..One.race..Some.other.race
## 1                                                         374
## 2                                                        3398
## 3                                                         777
## 4                                                           9
## 5                                                        1037
## 6                                                         318
##   Margin.of.Error..RACE..Total.population..One.race..Some.other.race
## 1                                                                283
## 2                                                                926
## 3                                                                218
## 4                                                                 19
## 5                                                                499
## 6                                                                324
##   Annotation.of.Margin.of.Error..RACE..Total.population..One.race..Some.other.race
## 1                                                                             null
## 2                                                                             null
## 3                                                                             null
## 4                                                                             null
## 5                                                                             null
## 6                                                                             null
##   Annotation.of.Estimate..RACE..Total.population..One.race..Some.other.race
## 1                                                                      null
## 2                                                                      null
## 3                                                                      null
## 4                                                                      null
## 5                                                                      null
## 6                                                                      null
##   Estimate..RACE..Total.population..Two.or.more.races.1
## 1                                                  1421
## 2                                                  5677
## 3                                                   522
## 4                                                   114
## 5                                                  1293
## 6                                                    75
##   Annotation.of.Estimate..RACE..Total.population..Two.or.more.races
## 1                                                              null
## 2                                                              null
## 3                                                              null
## 4                                                              null
## 5                                                              null
## 6                                                              null
##   Margin.of.Error..RACE..Total.population..Two.or.more.races.1
## 1                                                          397
## 2                                                         1040
## 3                                                          176
## 4                                                           84
## 5                                                          289
## 6                                                           80
##   Annotation.of.Margin.of.Error..RACE..Total.population..Two.or.more.races
## 1                                                                     null
## 2                                                                     null
## 3                                                                     null
## 4                                                                     null
## 5                                                                     null
## 6                                                                     null
##   Estimate..RACE..Total.population..Two.or.more.races..White.and.Black.or.African.American
## 1                                                                                      384
## 2                                                                                      733
## 3                                                                                       26
## 4                                                                                       25
## 5                                                                                      227
## 6                                                                                        0
##   Margin.of.Error..RACE..Total.population..Two.or.more.races..White.and.Black.or.African.American
## 1                                                                                             243
## 2                                                                                             357
## 3                                                                                              26
## 4                                                                                              26
## 5                                                                                             146
## 6                                                                                              19
##   Annotation.of.Margin.of.Error..RACE..Total.population..Two.or.more.races..White.and.Black.or.African.American
## 1                                                                                                          null
## 2                                                                                                          null
## 3                                                                                                          null
## 4                                                                                                          null
## 5                                                                                                          null
## 6                                                                                                          null
##   Annotation.of.Estimate..RACE..Total.population..Two.or.more.races..White.and.Black.or.African.American
## 1                                                                                                   null
## 2                                                                                                   null
## 3                                                                                                   null
## 4                                                                                                   null
## 5                                                                                                   null
## 6                                                                                                   null
##   Estimate..RACE..Total.population..Two.or.more.races..White.and.American.Indian.and.Alaska.Native
## 1                                                                                              274
## 2                                                                                             1589
## 3                                                                                               76
## 4                                                                                               78
## 5                                                                                              654
## 6                                                                                               13
##   Annotation.of.Estimate..RACE..Total.population..Two.or.more.races..White.and.American.Indian.and.Alaska.Native
## 1                                                                                                           null
## 2                                                                                                           null
## 3                                                                                                           null
## 4                                                                                                           null
## 5                                                                                                           null
## 6                                                                                                           null
##   Margin.of.Error..RACE..Total.population..Two.or.more.races..White.and.American.Indian.and.Alaska.Native
## 1                                                                                                     102
## 2                                                                                                     399
## 3                                                                                                      65
## 4                                                                                                      79
## 5                                                                                                     159
## 6                                                                                                      27
##   Annotation.of.Margin.of.Error..RACE..Total.population..Two.or.more.races..White.and.American.Indian.and.Alaska.Native
## 1                                                                                                                  null
## 2                                                                                                                  null
## 3                                                                                                                  null
## 4                                                                                                                  null
## 5                                                                                                                  null
## 6                                                                                                                  null
##   Estimate..RACE..Total.population..Two.or.more.races..White.and.Asian
## 1                                                                  244
## 2                                                                  943
## 3                                                                   10
## 4                                                                    2
## 5                                                                   33
## 6                                                                    0
##   Margin.of.Error..RACE..Total.population..Two.or.more.races..White.and.Asian
## 1                                                                         174
## 2                                                                         354
## 3                                                                          19
## 4                                                                           4
## 5                                                                          41
## 6                                                                          19
##   Annotation.of.Margin.of.Error..RACE..Total.population..Two.or.more.races..White.and.Asian
## 1                                                                                      null
## 2                                                                                      null
## 3                                                                                      null
## 4                                                                                      null
## 5                                                                                      null
## 6                                                                                      null
##   Annotation.of.Estimate..RACE..Total.population..Two.or.more.races..White.and.Asian
## 1                                                                               null
## 2                                                                               null
## 3                                                                               null
## 4                                                                               null
## 5                                                                               null
## 6                                                                               null
##   Estimate..RACE..Total.population..Two.or.more.races..Black.or.African.American.and.American.Indian.and.Alaska.Native
## 1                                                                                                                   18
## 2                                                                                                                   77
## 3                                                                                                                   95
## 4                                                                                                                    0
## 5                                                                                                                    0
## 6                                                                                                                    0
##   Margin.of.Error..RACE..Total.population..Two.or.more.races..Black.or.African.American.and.American.Indian.and.Alaska.Native
## 1                                                                                                                          25
## 2                                                                                                                          97
## 3                                                                                                                          84
## 4                                                                                                                          23
## 5                                                                                                                          29
## 6                                                                                                                          19
##   Annotation.of.Margin.of.Error..RACE..Total.population..Two.or.more.races..Black.or.African.American.and.American.Indian.and.Alaska.Native
## 1                                                                                                                                      null
## 2                                                                                                                                      null
## 3                                                                                                                                      null
## 4                                                                                                                                      null
## 5                                                                                                                                      null
## 6                                                                                                                                      null
##   Annotation.of.Estimate..RACE..Total.population..Two.or.more.races..Black.or.African.American.and.American.Indian.and.Alaska.Native
## 1                                                                                                                               null
## 2                                                                                                                               null
## 3                                                                                                                               null
## 4                                                                                                                               null
## 5                                                                                                                               null
## 6                                                                                                                               null
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population
## 1                                                                                 55639
## 2                                                                                218289
## 3                                                                                 25026
## 4                                                                                 22374
## 5                                                                                 57755
## 6                                                                                 10173
##   Annotation.of.Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population
## 1                                                                                                null
## 2                                                                                                null
## 3                                                                                                null
## 4                                                                                                null
## 5                                                                                                null
## 6                                                                                                null
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population
## 1                                                                                        *****
## 2                                                                                        *****
## 3                                                                                        *****
## 4                                                                                        *****
## 5                                                                                        *****
## 6                                                                                        *****
##   Annotation.of.Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population
## 1                                                                                                      *****
## 2                                                                                                      *****
## 3                                                                                                      *****
## 4                                                                                                      *****
## 5                                                                                                      *****
## 6                                                                                                      *****
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..White
## 1                                                                                        43422
## 2                                                                                       191923
## 3                                                                                        11989
## 4                                                                                        17243
## 5                                                                                        55555
## 6                                                                                         2683
##   Annotation.of.Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..White
## 1                                                                                                       null
## 2                                                                                                       null
## 3                                                                                                       null
## 4                                                                                                       null
## 5                                                                                                       null
## 6                                                                                                       null
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..White
## 1                                                                                                 396
## 2                                                                                                1392
## 3                                                                                                 232
## 4                                                                                                 104
## 5                                                                                                 511
## 6                                                                                                 324
##   Annotation.of.Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..White
## 1                                                                                                              null
## 2                                                                                                              null
## 3                                                                                                              null
## 4                                                                                                              null
## 5                                                                                                              null
## 6                                                                                                              null
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Black.or.African.American
## 1                                                                                                            11423
## 2                                                                                                            20377
## 3                                                                                                            12140
## 4                                                                                                             5079
## 5                                                                                                             1098
## 6                                                                                                             7035
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Black.or.African.American
## 1                                                                                                                     129
## 2                                                                                                                     550
## 3                                                                                                                     124
## 4                                                                                                                     142
## 5                                                                                                                      77
## 6                                                                                                                     121
##   Annotation.of.Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Black.or.African.American
## 1                                                                                                                                  null
## 2                                                                                                                                  null
## 3                                                                                                                                  null
## 4                                                                                                                                  null
## 5                                                                                                                                  null
## 6                                                                                                                                  null
##   Annotation.of.Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Black.or.African.American
## 1                                                                                                                           null
## 2                                                                                                                           null
## 3                                                                                                                           null
## 4                                                                                                                           null
## 5                                                                                                                           null
## 6                                                                                                                           null
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..American.Indian.and.Alaska.Native
## 1                                                                                                                      447
## 2                                                                                                                     3347
## 3                                                                                                                      315
## 4                                                                                                                       90
## 5                                                                                                                      796
## 6                                                                                                                       13
##   Annotation.of.Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..American.Indian.and.Alaska.Native
## 1                                                                                                                                   null
## 2                                                                                                                                   null
## 3                                                                                                                                   null
## 4                                                                                                                                   null
## 5                                                                                                                                   null
## 6                                                                                                                                   null
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..American.Indian.and.Alaska.Native
## 1                                                                                                                              25
## 2                                                                                                                             341
## 3                                                                                                                             158
## 4                                                                                                                              86
## 5                                                                                                                             149
## 6                                                                                                                              27
##   Annotation.of.Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..American.Indian.and.Alaska.Native
## 1                                                                                                                                          null
## 2                                                                                                                                          null
## 3                                                                                                                                          null
## 4                                                                                                                                          null
## 5                                                                                                                                          null
## 6                                                                                                                                          null
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Asian
## 1                                                                                         1048
## 2                                                                                         3120
## 3                                                                                          155
## 4                                                                                           67
## 5                                                                                          288
## 6                                                                                          192
##   Annotation.of.Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Asian
## 1                                                                                                       null
## 2                                                                                                       null
## 3                                                                                                       null
## 4                                                                                                       null
## 5                                                                                                       null
## 6                                                                                                       null
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Asian
## 1                                                                                                 140
## 2                                                                                                 145
## 3                                                                                                  25
## 4                                                                                                  82
## 5                                                                                                  27
## 6                                                                                                 138
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Native.Hawaiian.and.Other.Pacific.Islander
## 1                                                                                                                                24
## 2                                                                                                                               570
## 3                                                                                                                                28
## 4                                                                                                                                 0
## 5                                                                                                                                83
## 6                                                                                                                                 0
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Native.Hawaiian.and.Other.Pacific.Islander
## 1                                                                                                                                       37
## 2                                                                                                                                      537
## 3                                                                                                                                       32
## 4                                                                                                                                       23
## 5                                                                                                                                       67
## 6                                                                                                                                       19
##   Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Some.other.race
## 1                                                                                                    720
## 2                                                                                                   4928
## 3                                                                                                   1009
## 4                                                                                                      9
## 5                                                                                                   1315
## 6                                                                                                    325
##   Annotation.of.Estimate..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Some.other.race
## 1                                                                                                                 null
## 2                                                                                                                 null
## 3                                                                                                                 null
## 4                                                                                                                 null
## 5                                                                                                                 null
## 6                                                                                                                 null
##   Margin.of.Error..Race.alone.or.in.combination.with.one.or.more.other.races..Total.population..Some.other.race
## 1                                                                                                           251
## 2                                                                                                          1102
## 3                                                                                                           194
## 4                                                                                                            19
## 5                                                                                                           525
## 6                                                                                                           324
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population
## 1                                                   55639
## 2                                                  218289
## 3                                                   25026
## 4                                                   22374
## 5                                                   57755
## 6                                                   10173
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race.
## 1                                                                                      1601
## 2                                                                                      9947
## 3                                                                                      1110
## 4                                                                                       600
## 5                                                                                      5362
## 6                                                                                       824
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Mexican
## 1                                                                                                742
## 2                                                                                               5206
## 3                                                                                                844
## 4                                                                                                162
## 5                                                                                               4777
## 6                                                                                                756
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Mexican
## 1                                                                                                       259
## 2                                                                                                       915
## 3                                                                                                       159
## 4                                                                                                        92
## 5                                                                                                       306
## 6                                                                                                       126
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Puerto.Rican
## 1                                                                                                     423
## 2                                                                                                    1217
## 3                                                                                                      74
## 4                                                                                                      61
## 5                                                                                                     128
## 6                                                                                                      67
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Puerto.Rican
## 1                                                                                                            229
## 2                                                                                                            608
## 3                                                                                                             44
## 4                                                                                                             83
## 5                                                                                                            111
## 6                                                                                                            126
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Cuban
## 1                                                                                              211
## 2                                                                                              423
## 3                                                                                                0
## 4                                                                                               19
## 5                                                                                               68
## 6                                                                                                0
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Cuban
## 1                                                                                                     204
## 2                                                                                                     228
## 3                                                                                                      23
## 4                                                                                                      25
## 5                                                                                                     101
## 6                                                                                                      19
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Other.Hispanic.or.Latino
## 1                                                                                                                 225
## 2                                                                                                                3101
## 3                                                                                                                 192
## 4                                                                                                                 358
## 5                                                                                                                 389
## 6                                                                                                                   1
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Hispanic.or.Latino..of.any.race...Other.Hispanic.or.Latino
## 1                                                                                                                        165
## 2                                                                                                                        842
## 3                                                                                                                        158
## 4                                                                                                                        113
## 5                                                                                                                        269
## 6                                                                                                                          3
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino
## 1                                                                           54038
## 2                                                                          208342
## 3                                                                           23916
## 4                                                                           21774
## 5                                                                           52393
## 6                                                                            9349
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..White.alone
## 1                                                                                        41160
## 2                                                                                       180955
## 3                                                                                        11332
## 4                                                                                        16650
## 5                                                                                        50065
## 6                                                                                         2162
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..White.alone
## 1                                                                                                  78
## 2                                                                                                 654
## 3                                                                                                  83
## 4                                                                                                  23
## 5                                                                                                 250
## 6                                                                                                  19
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Black.or.African.American.alone
## 1                                                                                                            10849
## 2                                                                                                            19027
## 3                                                                                                            11889
## 4                                                                                                             4971
## 5                                                                                                              771
## 6                                                                                                             6980
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Black.or.African.American.alone
## 1                                                                                                                     345
## 2                                                                                                                     744
## 3                                                                                                                     179
## 4                                                                                                                     111
## 5                                                                                                                     167
## 6                                                                                                                     140
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..American.Indian.and.Alaska.Native.alone
## 1                                                                                                                      155
## 2                                                                                                                     1327
## 3                                                                                                                       81
## 4                                                                                                                       12
## 5                                                                                                                       49
## 6                                                                                                                        0
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..American.Indian.and.Alaska.Native.alone
## 1                                                                                                                             102
## 2                                                                                                                             371
## 3                                                                                                                              63
## 4                                                                                                                              25
## 5                                                                                                                              41
## 6                                                                                                                              19
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Asian.alone
## 1                                                                                          649
## 2                                                                                         2033
## 3                                                                                          122
## 4                                                                                           56
## 5                                                                                          236
## 6                                                                                          137
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Asian.alone
## 1                                                                                                 174
## 2                                                                                                 352
## 3                                                                                                  25
## 4                                                                                                  81
## 5                                                                                                  41
## 6                                                                                                 117
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Native.Hawaiian.and.Other.Pacific.Islander.alone
## 1                                                                                                                                 0
## 2                                                                                                                                10
## 3                                                                                                                                 1
## 4                                                                                                                                 0
## 5                                                                                                                                55
## 6                                                                                                                                 0
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Native.Hawaiian.and.Other.Pacific.Islander.alone
## 1                                                                                                                                       29
## 2                                                                                                                                       16
## 3                                                                                                                                        2
## 4                                                                                                                                       23
## 5                                                                                                                                       60
## 6                                                                                                                                       19
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Some.other.race.alone
## 1                                                                                                    101
## 2                                                                                                    740
## 3                                                                                                    157
## 4                                                                                                      0
## 5                                                                                                    179
## 6                                                                                                      2
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Some.other.race.alone
## 1                                                                                                           145
## 2                                                                                                           534
## 3                                                                                                           110
## 4                                                                                                            23
## 5                                                                                                           225
## 6                                                                                                             4
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Two.or.more.races
## 1                                                                                               1124
## 2                                                                                               4250
## 3                                                                                                334
## 4                                                                                                 85
## 5                                                                                               1038
## 6                                                                                                 68
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Two.or.more.races
## 1                                                                                                       374
## 2                                                                                                       871
## 3                                                                                                       149
## 4                                                                                                        67
## 5                                                                                                       181
## 6                                                                                                        76
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Two.or.more.races..Two.races.including.Some.other.race
## 1                                                                                                                                      54
## 2                                                                                                                                     299
## 3                                                                                                                                      44
## 4                                                                                                                                       0
## 5                                                                                                                                     107
## 6                                                                                                                                       0
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Two.or.more.races..Two.races.including.Some.other.race
## 1                                                                                                                                             57
## 2                                                                                                                                            231
## 3                                                                                                                                             47
## 4                                                                                                                                             23
## 5                                                                                                                                             95
## 6                                                                                                                                             19
##   Estimate..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Two.or.more.races..Two.races.excluding.Some.other.race..and.Three.or.more.races
## 1                                                                                                                                                             1070
## 2                                                                                                                                                             3951
## 3                                                                                                                                                              290
## 4                                                                                                                                                               85
## 5                                                                                                                                                              931
## 6                                                                                                                                                               68
##   Margin.of.Error..HISPANIC.OR.LATINO.AND.RACE..Total.population..Not.Hispanic.or.Latino..Two.or.more.races..Two.races.excluding.Some.other.race..and.Three.or.more.races
## 1                                                                                                                                                                     374
## 2                                                                                                                                                                     854
## 3                                                                                                                                                                     142
## 4                                                                                                                                                                      67
## 5                                                                                                                                                                     160
## 6                                                                                                                                                                      76

We need to calculate the percentage of white by dividing Estimate..RACE..Total population..One race..White by Estimate..SEX.AND.AGE..Total.population

USCensusDemographic <- USCensusDemographic %>%
  mutate(percent.white = (Estimate..RACE..Total.population..One.race..White / Estimate..SEX.AND.AGE..Total.population) * 100)

We select the column Estimate..RACE..Total population..One race..White and Geography.

# Select columns and create a new dataframe called USCensusDemographic_select
USCensusDemographic_select <- USCensusDemographic %>%
  select(Geography, percent.white)

head(USCensusDemographic_select)
##        Geography percent.white
## 1 0500000US01001      75.75621
## 2 0500000US01003      85.43903
## 3 0500000US01005      46.29985
## 4 0500000US01007      76.59784
## 5 0500000US01009      93.96762
## 6 0500000US01011      26.17714

We remove the “0500000US” part in the Geography column for the USCensusDemographic_select dataframe.

# Remove "0500000US" from the 'Geography' column in USCensusDemographic_select
USCensusDemographic_select$Geography <- gsub("0500000US", "", USCensusDemographic_select$Geography)

head(USCensusDemographic_select)
##   Geography percent.white
## 1     01001      75.75621
## 2     01003      85.43903
## 3     01005      46.29985
## 4     01007      76.59784
## 5     01009      93.96762
## 6     01011      26.17714

We use the left_join() function to join USCensusDemographic_select to suicide_data by the Geography column:

# Join USCensusDemographic_select to suicide_data
suicide_data <- suicide_data %>%
  left_join(USCensusDemographic_select, by = "Geography")

head(suicide_data)
##               County Geography Deaths Population Crude.Rate LND_SQMI
## 1 Autauga County, AL     01001    115     609875  18.900000   604.49
## 2 Baldwin County, AL     01003    444    2250866  19.700000  2027.08
## 3 Barbour County, AL     01005     41     287620  14.300000   904.59
## 4    Bibb County, AL     01007     38     248120  15.300000   625.50
## 5  Blount County, AL     01009    122     635351  19.200000   650.65
## 6 Bullock County, AL     01011     11     114915   9.572293   626.11
##   population.density Median.income percent.white
## 1          1008.9083         57982      75.75621
## 2          1110.3982         61756      85.43903
## 3           317.9562         34990      46.29985
## 4           396.6747         51721      76.59784
## 5           976.4866         48922      93.96762
## 6           183.5380         33866      26.17714

4. percentage of people who live alone

USCensusHousehold has information on household formation using data from the American Community Survey. We select the column Estimate..Total..Total.households..SELECTED.HOUSEHOLDS.BY.TYPE..Householder.living.alone, which provides a 5-year estimate of the percentage of people living alone in each county, and Geography.

# Select columns and create a new dataframe called USCensusHousehold_select
USCensusHousehold_select <- USCensusHousehold %>%
  select(Geography, Estimate..Total..Total.households..SELECTED.HOUSEHOLDS.BY.TYPE..Householder.living.alone)

head(USCensusHousehold_select)
##        Geography
## 1 0500000US01001
## 2 0500000US01003
## 3 0500000US01005
## 4 0500000US01007
## 5 0500000US01009
## 6 0500000US01011
##   Estimate..Total..Total.households..SELECTED.HOUSEHOLDS.BY.TYPE..Householder.living.alone
## 1                                                                                     26.3
## 2                                                                                     29.0
## 3                                                                                     32.8
## 4                                                                                     25.9
## 5                                                                                     25.9
## 6                                                                                     35.4

We remove “0500000US” from the Geography column in USCensusHousehold_select.

# Remove "0500000US" from the 'Geography' column in USCensusHousehold_select
USCensusHousehold_select$Geography <- gsub("0500000US", "", USCensusHousehold_select$Geography)

head(USCensusHousehold_select)
##   Geography
## 1     01001
## 2     01003
## 3     01005
## 4     01007
## 5     01009
## 6     01011
##   Estimate..Total..Total.households..SELECTED.HOUSEHOLDS.BY.TYPE..Householder.living.alone
## 1                                                                                     26.3
## 2                                                                                     29.0
## 3                                                                                     32.8
## 4                                                                                     25.9
## 5                                                                                     25.9
## 6                                                                                     35.4

Let’s rename the columns in USCensusHousehold_select

# Rename column in USCensusHousehold_select
USCensusHousehold_select <- USCensusHousehold_select %>%
  rename(percentage.alone = Estimate..Total..Total.households..SELECTED.HOUSEHOLDS.BY.TYPE..Householder.living.alone)

head(USCensusHousehold_select)
##   Geography percentage.alone
## 1     01001             26.3
## 2     01003             29.0
## 3     01005             32.8
## 4     01007             25.9
## 5     01009             25.9
## 6     01011             35.4

Let’s join USCensusHousehold_select to suicide_data using the Geography column.

# Join USCensusHousehold_select to suicide_data
suicide_data <- suicide_data %>%
  left_join(USCensusHousehold_select, by = "Geography")

head(suicide_data)
##               County Geography Deaths Population Crude.Rate LND_SQMI
## 1 Autauga County, AL     01001    115     609875  18.900000   604.49
## 2 Baldwin County, AL     01003    444    2250866  19.700000  2027.08
## 3 Barbour County, AL     01005     41     287620  14.300000   904.59
## 4    Bibb County, AL     01007     38     248120  15.300000   625.50
## 5  Blount County, AL     01009    122     635351  19.200000   650.65
## 6 Bullock County, AL     01011     11     114915   9.572293   626.11
##   population.density Median.income percent.white percentage.alone
## 1          1008.9083         57982      75.75621             26.3
## 2          1110.3982         61756      85.43903             29.0
## 3           317.9562         34990      46.29985             32.8
## 4           396.6747         51721      76.59784             25.9
## 5           976.4866         48922      93.96762             25.9
## 6           183.5380         33866      26.17714             35.4

Recoding Data

Let’s select the important columns from suicide_data

# Select important columns from suicide_data
suicide_data_select <- suicide_data %>%
  select(Geography, Deaths, Crude.Rate, population.density, Median.income, percent.white, percentage.alone)

head(suicide_data_select)
##   Geography Deaths Crude.Rate population.density Median.income percent.white
## 1     01001    115  18.900000          1008.9083         57982      75.75621
## 2     01003    444  19.700000          1110.3982         61756      85.43903
## 3     01005     41  14.300000           317.9562         34990      46.29985
## 4     01007     38  15.300000           396.6747         51721      76.59784
## 5     01009    122  19.200000           976.4866         48922      93.96762
## 6     01011     11   9.572293           183.5380         33866      26.17714
##   percentage.alone
## 1             26.3
## 2             29.0
## 3             32.8
## 4             25.9
## 5             25.9
## 6             35.4

We need to make sure the relevant columns are in the correct class for analysis. Let’s convert the necessary columns to the appropriate class.

# Check the class of each column
sapply(suicide_data_select, class)
##          Geography             Deaths         Crude.Rate population.density 
##        "character"        "character"          "numeric"          "numeric" 
##      Median.income      percent.white   percentage.alone 
##        "character"          "numeric"          "numeric"
# Convert necessary columns to appropriate class
suicide_data_select$Deaths <- as.numeric(as.character(suicide_data_select$Deaths))
## Warning: NAs introduced by coercion
suicide_data_select$Crude.Rate <- as.numeric(as.character(suicide_data_select$Crude.Rate))
suicide_data_select$Median.income <- as.numeric(as.character(suicide_data_select$Median.income))
## Warning: NAs introduced by coercion
suicide_data_select$percent.white <- as.numeric(suicide_data_select$percent.white)

# Check the class of each column again
sapply(suicide_data_select, class)
##          Geography             Deaths         Crude.Rate population.density 
##        "character"          "numeric"          "numeric"          "numeric" 
##      Median.income      percent.white   percentage.alone 
##          "numeric"          "numeric"          "numeric"
# Check for missing values
colSums(is.na(suicide_data_select[c("Crude.Rate", "population.density", "Median.income", "percent.white", "percentage.alone")]))
##         Crude.Rate population.density      Median.income      percent.white 
##                334                 10                 10                  9 
##   percentage.alone 
##                  9

Before proceeding with analysis, we would address missing values. Depending on the context and the amount of missing data, we’d consider different strategies such as imputation, using complete cases only, or exploring the reasons behind the missing data to understand any potential biases.

Analyses

Step 3: Descriptive Statistics

Now that we have all the files merged, we conduct descriptive statistics on each of the variables of interest (Crude.Rate, population.density (the number of people / sq mile of land area), Median.income, percent.white, percentage.alone)

To make sure we don’t have any values that need to be recoded. Whenever we are working with income data, we should see if it is normally distributed or would be better represented as a log transformation.

# Crude.Rate
hist(suicide_data_select$Crude.Rate)

hist(log10(suicide_data_select$Crude.Rate + 1))

This data appears normal.

# population.density
hist(suicide_data_select$population.density)

hist(log10(suicide_data_select$population.density + 1))

This data appears normal.

# Median.income
hist(suicide_data_select$Median.income)

hist(log10(suicide_data_select$Median.income + 1))

This data appears normal.

# percent.white
hist(suicide_data_select$percent.white)

hist(log10(suicide_data_select$percent.white + 1))

The percent white is skewed.

# percentage.alone
hist(suicide_data_select$percentage.alone)

hist(log10(suicide_data_select$percentage.alone + 1))

This data appears normal.

# Descriptive statistics for variables of interest
summary(suicide_data_select[c("Crude.Rate", "population.density", "Median.income", "percent.white", "percentage.alone")])
##    Crude.Rate     population.density Median.income    percent.white    
##  Min.   :  5.20   Min.   :     0.4   Min.   : 22292   Min.   :  9.352  
##  1st Qu.: 13.60   1st Qu.:   176.4   1st Qu.: 45668   1st Qu.: 74.681  
##  Median : 16.80   Median :   469.8   Median : 52856   Median : 88.102  
##  Mean   : 17.74   Mean   :  2460.4   Mean   : 55026   Mean   : 81.814  
##  3rd Qu.: 20.50   3rd Qu.:  1199.9   3rd Qu.: 61502   3rd Qu.: 94.087  
##  Max.   :115.60   Max.   :531226.6   Max.   :147111   Max.   :100.000  
##  NA's   :334      NA's   :10         NA's   :10       NA's   :9        
##  percentage.alone
##  Min.   : 8.50   
##  1st Qu.:25.60   
##  Median :28.80   
##  Mean   :28.79   
##  3rd Qu.:31.70   
##  Max.   :71.00   
##  NA's   :9

Stepwise Model

Step 4: Let’s use a stepwise model to determine which variables should be included in our “best” model. Run at least 2 of the following 3 models: backwards stepwise, forward stepwise, or both.

# Remove rows with NA values from the dataset
suicide_data_select_omit <- na.omit(suicide_data_select)
# Fit the full model using the cleaned data
fullmodel <- lm(Crude.Rate ~ population.density + Median.income + 
                 percent.white + percentage.alone, data = suicide_data_select_omit)

# Perform backward stepwise selection
step(fullmodel, direction="backward")
## Start:  AIC=10014.45
## Crude.Rate ~ population.density + Median.income + percent.white + 
##     percentage.alone
## 
##                      Df Sum of Sq    RSS   AIC
## <none>                             98928 10014
## - percentage.alone    1      98.5  99027 10015
## - population.density  1     960.0  99889 10040
## - percent.white       1    3350.6 102279 10106
## - Median.income       1    3966.3 102895 10123
## 
## Call:
## lm(formula = Crude.Rate ~ population.density + Median.income + 
##     percent.white + percentage.alone, data = suicide_data_select_omit)
## 
## Coefficients:
##        (Intercept)  population.density       Median.income       percent.white  
##          1.604e+01          -4.213e-05          -9.228e-05           6.860e-02  
##   percentage.alone  
##          4.523e-02

Based on the stepwise model selection output, the model with no variables removed has the lowest AIC (10014).

#forward
full_model <- formula(lm(Crude.Rate ~ population.density + Median.income + 
percent.white + percentage.alone, data=(suicide_data_select_omit)))
intercept_only <- lm(Crude.Rate ~ 1, data=na.omit(suicide_data_select_omit))
step(intercept_only, direction="forward", scope=full_model)
## Start:  AIC=10313.5
## Crude.Rate ~ 1
## 
##                      Df Sum of Sq    RSS   AIC
## + Median.income       1    6133.1 104222 10155
## + percent.white       1    3370.8 106985 10228
## + population.density  1    3241.9 107114 10232
## + percentage.alone    1    1224.5 109131 10284
## <none>                            110355 10314
## 
## Step:  AIC=10154.88
## Crude.Rate ~ Median.income
## 
##                      Df Sum of Sq    RSS   AIC
## + percent.white       1    4316.1  99906 10038
## + population.density  1    1856.7 102366 10106
## <none>                            104222 10155
## + percentage.alone    1       0.7 104222 10157
## 
## Step:  AIC=10038.07
## Crude.Rate ~ Median.income + percent.white
## 
##                      Df Sum of Sq   RSS   AIC
## + population.density  1     879.3 99027 10015
## <none>                            99906 10038
## + percentage.alone    1      17.8 99889 10040
## 
## Step:  AIC=10015.24
## Crude.Rate ~ Median.income + percent.white + population.density
## 
##                    Df Sum of Sq   RSS   AIC
## + percentage.alone  1    98.502 98928 10014
## <none>                          99027 10015
## 
## Step:  AIC=10014.45
## Crude.Rate ~ Median.income + percent.white + population.density + 
##     percentage.alone
## 
## Call:
## lm(formula = Crude.Rate ~ Median.income + percent.white + population.density + 
##     percentage.alone, data = na.omit(suicide_data_select_omit))
## 
## Coefficients:
##        (Intercept)       Median.income       percent.white  population.density  
##          1.604e+01          -9.228e-05           6.860e-02          -4.213e-05  
##   percentage.alone  
##          4.523e-02

Based on the forward stepwise model selection output, the final model includes all four variables. These results are consistent with those obtained from the backward stepwise selection.

# Fit the full model using the cleaned data
fullmodel <- lm(Crude.Rate ~ population.density + Median.income + 
                 percent.white + percentage.alone, data = suicide_data_select_omit)

# Perform stepwise selection (both forward and backward)
step(fullmodel, direction="both")
## Start:  AIC=10014.45
## Crude.Rate ~ population.density + Median.income + percent.white + 
##     percentage.alone
## 
##                      Df Sum of Sq    RSS   AIC
## <none>                             98928 10014
## - percentage.alone    1      98.5  99027 10015
## - population.density  1     960.0  99889 10040
## - percent.white       1    3350.6 102279 10106
## - Median.income       1    3966.3 102895 10123
## 
## Call:
## lm(formula = Crude.Rate ~ population.density + Median.income + 
##     percent.white + percentage.alone, data = suicide_data_select_omit)
## 
## Coefficients:
##        (Intercept)  population.density       Median.income       percent.white  
##          1.604e+01          -4.213e-05          -9.228e-05           6.860e-02  
##   percentage.alone  
##          4.523e-02

The stepwise selection process found that the best model includes all four predictor variables since removing any of them would result in an increased AIC value.

Step 5: Interprate Findings

Based on the analysis of the county-level data, we found that four predictor variables had a significant association with the Crude Rate of suicide.

The results show a negative association between population density and the Crude Rate of suicide. This implies that, on average, counties with higher population density tend to have lower suicide rates, while controlling for other factors in the model.

There is a negative association between median income and the Crude Rate of suicide. This suggests that, on average, counties with higher median income levels tend to have lower suicide rates, while controlling for other factors in the model.

The results show a positive association between the percentage of the white population in a county and the Crude Rate of suicide. This indicates that, on average, counties with a higher proportion of white residents tend to have higher suicide rates, while controlling for other factors in the model.

There is a positive association between the percentage of people living alone in a county and the Crude Rate of suicide. This suggests that, on average, counties with a higher proportion of individuals living alone tend to have higher suicide rates, while controlling for other factors in the model.

Student Wellbeing: If you are struggling for any reason (relationship, family, illness, or life’s stresses) or notice a significant change in your mood, sleep, feelings of hopelessness or a lack of self-worth, consider connecting immediately with Counseling Services (1529 Belmont Street, Norco Building) at (208) 426-1459 or email . You can always call the Suicide and Crisis Lifeline: 988 if you need help. Your mental health matters! Please reach out if you are struggling. In the grand scheme of things, statistics is not that important