Showing posts with label Regression. Show all posts
Showing posts with label Regression. Show all posts

Saturday, March 28, 2020

County Health Rankings and Corona Virus Cases: Lower ranked counties have fewer cases in PA (except for Philly)

I thought I would take a break from Corona Virus numbers to talk about other numbers that I have covered over the years: County Health Rankings and the the Southern Poverty Law Centers annual count of hate groups in the US.  On the surface they are unrelated but because both happens in Pennsylvania and the rest of the U.S. they are tangentially related.


Above are the maps showing the rankings for Pennsylvania.  On the left are the rankings for health outcomes which are a composite of length of life and quality of life data.  Darker green means lower ranked.  

On the right are the rankings for health factors which contribute to the health outcomes. Likewise this ranking is a composite of health behaviors, clinical care, social and economic, and physical environment factors.  Darker blue counties are lower ranked. 



Philadelphia County was ranked last in both measures.  Union county was ranked first on health outcomes and Montgomery County was first on health factors. Ironically some of the highest ranked counties (except for Philadelphia) are the ones that have the fewest Corona Virus cases. I thought I would take a look at how the rankings correlate with the number of cases so far.

Measure
Number of Cases with Philly
Number of Cases w/o Philly
Health Outcome Z-Score
0.068
-0.349
Health Outcome Rank
-0.021
-0.300
Health Factor Z-Score
0.016
-0.464
Health Factor Rank
-0.069
-0.378

The correlation values with the ranking and the overall number of cases in each county are provided above.  With Philadelphia County included there is negligible correlation because it has a low ranking and a high number of cases.  The z scores are used to determine the ranking.  A high positive z score gives a low ranking.  

With Philadelphia County excluded, there are fairly strong negative correlations with the number of COVID-19 cases.  The strongest negative correlation is with the health factor z score (-0.464 or 21.5% of the variability).  This one I will look into further with a poisson regression analysis which is used to model count data.

The regression equation for health factors is 2.984 -2.001(zscore) and was statistically significant.  This means that for counties with a z score of zero they would be expected to have around 20 cases.  For every unit increase in the score, the number of cases is expected to decrease by 2.718 raised to the -2 power.    



The graph above is different from my usual regression plots because the y axis is on a logarithmic scale.  It indicates a good fit with the outliers of Montgomery, Fayette, and Montour counties.  More research will be needed to see if this pattern holds up elsewhere.

As previously mentioned, health factors is a composite of different sub measures.  These sub measures are determined by a dozens of county level statistics. Next I will look at which of these sub measures are most closely associated with Corona Virus cases.  Later I will look at the Southern Poverty Law Center's new hate group numbers.


**Related Posts**



Monday, September 2, 2019

Facebook Primary: Page Likes Predict Democrat Support (Except for Joe Biden)

Four years ago I showed that a candidate's following on Facebook predicted their support in the polls at this point four years ago.  It predicted 70.6% of the variability for Republicans and 75.6% of it for Democrats.  I thought I would lake a look at how the candidates fare with Facebook and Twitter in the Democratic primary this time around.  The 13 candidates that appear in the RCP poll Average are summarized in the graph below.



The graph above shows the number of Facebook page likes for the candidates on the x axis and the Real Clear Politics (RCP) national poll average % for that candidate.  The linear regression model accounted for 42.1% of the variability in the RCP average.  The fit line plot above show a good fit for each of the candidates except for Joe Biden who has the highest RCP poll average at 28.9% but only 1,487,733 Facebook page likes.  Biden has name recognition because he was Obama's Vice President.



If the model is rerun with Biden excluded, Facebook page likes now account for 87.1% of the variability in the RCP poll average.  The model predicts that for every increase on one million page likes for the candidate's official Facebook page, the RCP poll average is expected to increase by 3.62%.  If 100% of the variability were accounted for, all of the candidates would form a perfect straight line on the graph.  

I did look at the candidate's Twitter followings and their poll averages.  A similar pattern was found but the relationship was not as strong as it was for Facebook.  The model with Biden included accounted for 34.3% of the variability and without him it accounted for 55.4%.  

One should be careful not to assume a strong Facebook or Twitter following causes a candidate to have high poll numbers.  Strong poll numbers could cause a high Facebook following.  The Twitter and Facebook followings were highly correlated with a coefficient of 0.9018 accounting for 81.3% of the variability.

Kirsten Gillibrand and Jay Inslee dropped out of the race with 381,476 and 75,202 page likes respectively.  Michael Bennett, Bill De Blasio, and others remain in the race despite not registering in the polls and not qualifying for the Sept 12 debate.  Bennett has 103,933 page likes and De Blasio has 66,070.  Tulsi Gabbard just missed the debate because she did not have enough individual donors.  

The candidates poll numbers and Facebook and Twitter followings are summarized in the table below.  Facebook has taken steps to curve foreign influence in the upcoming election.  It will remain a force in the election.

Candidate
RCP Poll Avg %
FB Following
Twitter following
Biden
28.9
   1,487,733
   3,706,982
Sanders
17.1
   5,104,561
   9,619,000
Warren
16.5
   3,281,315
   3,087,005
Harris
7
   1,148,762
   3,090,636
Buttigieg
4.6
      441,495
   1,396,792
Yang
2.5
      178,036
      747,425
Booker
2.4
   1,192,725
   4,344,745
O'Rourke
2.4
        916,711
   1,565,273
Gabbard
1.4
       377,434
      542,790
Castro
1.1
       141,257
        379,882
Klobuchar
0.9
       258,582
        755,517
Bullock
0.8
         32,231
        185,238
Williamson
0.8
       814,883
     2,759,880


**Related Posts**



Saturday, October 28, 2017

Veterans, The Elderly, and Living Wage Cities/Counties

I asked others in the field of demographics on my last post on the percentage of veterans being a negative predictor of the amount of living wage enacted in the 38 cities/counties that have passed living wage ordinances.  One expert in the field suggested one variable that I hadn't considered.  




Chris Briem over at the blog Nullspace suggested I look at age as a possible variable that could mediate this relationship.  He stated that there are higher concentrations of veterans among the elderly.  This makes sense as the draft existed before 1970.  I did obtain the % of the population over the age of 65 for cities in the 2010 census and added it to the model seen below.


Coefficients
Standard Error
t Stat
P-value
Lower 95%
Upper 95%
Intercept
14.70
1.58
9.30
0.00
11.49
17.91
% veteran
-0.60
0.17
-3.61
0.00
-0.94
-0.26
% over 65
0.03
0.13
0.22
0.83
-0.24
0.30

The % of veterans in the city/county still significantly negatively predicted the amount of the living wage passed while the % over the age of 65 did not predict it in either direction.  These cities did have lower percentage of veterans (mean=4.95%) than the US (6.22%).  Likewise these cities did have lower percentages of those over 65 (mean=11.77%) than the US (13.00%).  

I looked at the correlation between the % of veterans and the % over 65.  There was a non-significant positive correlation between the variables as can be seen in the graph below.  Only 8% of the variability in the % over 65 was accounted for by the % veterans for these cities.  There are cities with high elderly populations and low veteran populations such as Palo Alto and El Cerrito, CA



It may be more informative to look at the % of elderly veterans vs. younger veterans as a predictor of the amount of the living wage.  I'm not sure where that data is available but it is a good area of inquiry.

**Related Posts**


What do Living Wage Cities Have in Common?





Veterans, the Living Wage, and the McNamara Fallacy

Tuesday, August 15, 2017

What do Living Wage Cities Have in Common?

On Saturday, August 12, the there is a profile of me in the local Johnstown, PA newspaper (the Tribune Democrat) on my campaign for city council. I was hoping to push for a living wage ordinance for the city but the State of Pennsylvania, along with 24 other states, has a law preventing the city from raising it's minimum wage as the map from the National Employment Law Project (NELP) shows.  I thought I would take a look at the characteristics of the cities/counties that have passed these ordinances.


NELP came out with a list of cities and counties that have passed minimum wage laws above the state or federal minimum wage. There are 38 cities and or counties that have passed such laws.  17 of these entities are in California, five were in New Mexico, three were in Washington state, two were in Maine, Missouri (which now has a law forcing them to go back to the federal wage), Maryland, and Kentucky (where there are lawsuits challenging these laws). Alabama along with Missouri has a law preventing municipalities from passing these laws after at least one city has passed them.  

The first cities to pass such laws were San Francisco, CA ($12.25) and Santa Fe, NM ($10.84) in 2003.  San Francisco increased it's wage in 2014 to $15.00 to be fully implemented in 2018.  Mountain View,CA revised it's 2014 increase to $15/hour in 2015 also to be fully implemented in 2018.  The most recent city to pass such a law is Minneapolis, MN at $15/hour to be implemented this year.

There were ten cities with populations less than 100,000 in 2016 and there were four cities with populations less than 40,000 (SeaTac, WA, El Cerrito, CA, Emeryville, CA, and Bangor, ME).  Looking at which variables might predict the amount of the living wage ordinance above the federal minimum of $7.25/hr, there was a borderline significantly regression line with the city population in 2016.  



As an indicator of health of the city or county's economy I looked at the % change in the population from the last decennial census to the estimated population in 2016. Only three of the cites had a net loss of population:  St. Louis, MO (-2.47%), Bangor ME (-3.19%), and Birmingham, AL (0.04%).  St. Louis and Birmingham, AL are required by their states to go back to the federal minimum.  The slope of the regression line was significantly positive with an estimated $0.17 increase in the living wage ordinance for every 1% increase in the population change.  As can be seen in the chart above,  Emeryville, CA had the largest increase in population and one of the largest increases in the minimum wage to $15/hr. 

One can speculate as to the reasons for this relationship.  Are cities with a population increase more receptive to the idea of a living wage ordinance?  Are areas with shrinking populations, and shrinking economies, less receptive to a living wage?  Is there something about the states that have passed laws barring cities from raising their minimum wages that is different from more receptive states like California and New Mexico?

I don't have the answers to the above questions.  This analysis cannot answer the more fundamental question of what impact these laws have on job growth in these areas.  Two studies came out recently looking at the impact of Seattle's living wage ordinance.  One said it's having a positive impact, the other said it's negative.  While it's important to look at Seattle's experience most of the cities on this list are not like Seattle.  The city most similar to my hometown in population trends is Bangor, Maine.  Studying that city would be most relevant for policy makers here, if the state would let us have a living wage.


City
State
year passed
Year implemented
amount
population when passed
Current population
Pop Change
% pop Change
Lawsuit
State Law
Revised
Albuquerque, NM
NM
2012
2012
$8.75
545852
559277
13425
2.46
0
0
0
Bangor, ME
ME
2015
2019
$9.75
33039
31985
-1054
-3.19
0
0
0
Berkeley, CA
CA
2014
2016
$12.53
112580
121240
8660
7.69
0
0
0
Bernalillo County, NM
NM
2013
2013
$8.65
662564
676953
14389
2.17
0
0
0
Birmingham, AL
AL
2015
2017
$10.10
212237
212157
-80
-0.04
0
1
0
Chicago, IL
IL
2014
2019
$13.00
2695598
2704958
9360
0.35
0
0
0
El Cerrito, CA
CA
2015
2019
$15.00
23549
25400
1851
7.86
0
0
0
Emeryville, CA
CA
2015
2018
$15.00
10080
11671
1591
15.78
0
0
0
Johnson County, IA
IA
2015
2017
$10.10
130882
146547
15665
11.97
0
0
0
Kansas City, MO
MO
2015
2020
$13.00
459787
481420
21633
4.71
0
1
0
Las Cruces, NM
NM
2014
2019
$10.10
97618
101759
4141
4.24
0
0
0
Lexington, KY
KY
2015
2018
$10.10
295803
318449
22646
7.66
1
0
0
Long Beach, CA
CA
2015
2016
$11.00
462257
470130
7873
1.70
0
0
0
Los Angeles County, CA
CA
2015
2021
$15.00
9818605
10137915
319310
3.25
0
0
0
Los Angeles, CA
CA
2015
2020
$15.00
3792621
3976322
183701
4.84
0
0
0
Louisville, KY
KY
2014
2017
$9.00
597337
616261
18924
3.17
1
0
0
Minneapolis, MN
MN
2017
2017
$15.00
382578
413651
31073
8.12
0
0
0
Montgomery County, MD
MD
2013
2017
$11.50
971777
1043863
72086
7.42
0
0
0
Mountain View, CA
CA
2015
2018
$15.00
74066
80447
6381
8.62
0
0
1
Mountain View, CA
CA
2014
2014
$10.30
74066
80447
6381
8.62
0
0
0
Oakland, CA
CA
2014
2014
$12.25
390724
420005
29281
7.49
0
0
0
Palo Alto, CA
CA
2015
2016
$11.00
64403
67024
2621
4.07
0
0
0
Portland, ME
ME
2015
2017
$10.68
66194
66937
743
1.12
0
0
0
Prince Georges County, MD
MD
2013
2017
$11.50
863420
908049
44629
5.17
0
0
0
Richmond, CA
CA
2014
2018
$13.00
103701
109813
6112
5.89
0
0
0
Sacramento, CA
CA
2015
2020
$12.50
466488
495234
28746
6.16
0
0
0
San Diego, CA
CA
2014
2017
$11.50
1307402
1406630
99228
7.59
0
0
0
San Francisco, CA
CA
2014
2018
$15.00
805235
870887
65652
8.15
0
0
1
San Francisco, CA
CA
2003
2003
$12.25
776733
870887
94154
12.12
0
0
0
San Jose, CA
CA
2012
2012
$10.30
945942
1025350
79408
8.39
0
0
0
Santa Clara, CA
CA
2015
2016
$11.00
116468
125948
9480
8.14
0
0
0
Santa Fe County, NM
NM
2014
2014
$10.84
144170
148651
4481
3.11
0
0
0
Santa Fe, NM
NM
2003
2003
$10.84
61109
67947
6838
11.19
0
0
0
Santa Monica, CA
CA
2015
2020
$15.00
89736
92478
2742
3.06
0
0
0
SeaTac, WA
WA
2013
2013
$15.24
26909
28873
1964
7.30
0
0
0
Seattle, WA
WA
2014
2021
$15.00
608660
704352
95692
15.72
0
0
0
St. Louis, MO
MO
2015
2018
$11.00
319294
311404
-7890
-2.47
0
1
0
Sunnyvale, CA
CA
2014
2014
$10.30
140081
152771
12690
9.06
0
0
0
Tacoma, WA
WA
2015
2018
$12.00
198397
211277
12880
6.49
0
0
0
Washington, DC
DC
2013
2016
$11.50
601723
681170
79447
13.20
0
0
0
**Related Posts**

Save Dollars. Save Lives: An evening with Dr. Gerald Friedman


Unemployment: A Universal Underreported Problem



State of Working PA: Slowing Job Growth, Falling Wages Impede Recovery (and The Drop in Uninsured)