Datasets Construction

State-Level Data

To view R code select the button to the right.

##State-level Hospital Compare Data
connection2 <- curl('https://data.medicare.gov/api/views/apyc-v239/rows.csv?accessType=DOWNLOAD')
cms.state <- read.csv(connection2, stringsAsFactors = F)
cms.state <- cms.state %>%
  filter(Measure.ID == "SEP_1")%>%
  mutate(Score = as.numeric(Score))%>%
  select(State, Score)%>%
  arrange(desc(Score))

#Load Spatial Mapping Data
states.map <- 
  geojsonio::geojson_read("C:/Users/jkempke/Documents/Medicare/data/json/gz_2010_us_040_00_5m.json", what = "sp")

#Load R state name and abrevation vectors for match merging

state.merger <-as.data.frame(cbind(state.abb, state.name))
state.merger <- state.merger %>% 
  rename(State = state.abb,
         NAME = state.name)

Hospital Level Data

To view R code select the button to the right.

##General Hospital Information
connection0 <- curl('https://data.medicare.gov/api/views/xubh-q36u/rows.csv?accessType=DOWNLOAD')
cms.general.info <- read.csv(connection0 , stringsAsFactors = F)

##Timely and Effective Care Information
connection3 <-curl('https://data.medicare.gov/api/views/yv7e-xc69/rows.csv?accessType=DOWNLOAD')
cms.hospital.timely <- read.csv(connection3,
                 stringsAsFactors = F)

key <- cms.hospital.timely %>%
  select(Condition, Measure.Name, Measure.ID)%>%
  unique()  %>%
  mutate(Measure.ID = if_else(Measure.ID=="IMM_3_OP_27_FAC_ADHPCT","IMM_3",Measure.ID),
         Measure.Name = 
        if_else(Measure.Name == "ED1", "Median time-ED arrival to departure in admitted patients",
        if_else(Measure.Name == "ED2", "Time-Admit decision to ED departute in admitted patients",
        if_else(Measure.Name == "OP 18", "Median time-ED arrival to departure in discharged patients", 
        if_else(Measure.Name == "OP-18", "Median time-ED arrival to departure in discharged Psych patients",
                Measure.Name)))))%>%
  mutate(Measure = paste0(Measure.Name, " (",Measure.ID, ")"))

sep1.sample <- cms.hospital.timely%>%
  filter(Measure.ID=="SEP_1")%>%
  mutate(SEP1.Sample = as.numeric(Sample))%>%
  select(Provider.ID, SEP1.Sample)

location <- cms.hospital.timely%>%
  select(Provider.ID, Location)%>%
  unique()%>%
  separate(Location, c("Location","Loc2"), sep = "[(]", remove = T)%>%
  separate(Loc2, c("lat","Loc3"), sep = "[,]", remove = F)%>%
  separate(Loc3, c("long", "Loc4"), sep = "[)]", remove = F)%>%
  select(-Loc2,-Loc3, -Loc4)%>%
  mutate(lat = as.numeric(lat),
         long  = as.numeric(long))

cms.hospital.timely.score <- cms.hospital.timely %>%
  mutate(Measure.ID = if_else(Measure.ID=="IMM_3_OP_27_FAC_ADHPCT","IMM_3",Measure.ID),
         Score = as.numeric(Score))%>%
  select(Provider.ID, Measure.ID, Score)%>%
  spread(key = Measure.ID,
         value = Score)

cms.hospital.timely <- left_join(cms.general.info, cms.hospital.timely.score,
                                 by = "Provider.ID")

cms.hospital.timely <- cms.hospital.timely %>%
  select(-c(
    Address,
    Location,
    Phone.Number,
    Hospital.overall.rating.footnote,
    Mortality.national.comparison.footnote,
    Readmission.national.comparison.footnote,
    Safety.of.care.national.comparison.footnote,
    Patient.experience.national.comparison.footnote,
    Effectiveness.of.care.national.comparison.footnote,
    Timeliness.of.care.national.comparison.footnote,
    Efficient.use.of.medical.imaging.national.comparison.footnote))%>%
  mutate(Hospital.overall.rating = as.numeric(Hospital.overall.rating))%>%
  mutate_at(vars(Hospital.Type,
                 Hospital.Ownership,
                 Emergency.Services,
                 Meets.criteria.for.meaningful.use.of.EHRs,
                 Mortality.national.comparison,
                 Readmission.national.comparison,
                 Safety.of.care.national.comparison,
                 Patient.experience.national.comparison,
                 Effectiveness.of.care.national.comparison,
                 Timeliness.of.care.national.comparison,
                 Efficient.use.of.medical.imaging.national.comparison),
            funs(as.factor))


cms.hospital.timely <- left_join(cms.hospital.timely, location,
                   by = "Provider.ID")
cms.hospital.timely <- left_join(cms.hospital.timely, sep1.sample,
                                 by = "Provider.ID")

## Correlations between scores
overall.score <- cms.hospital.timely %>%
    select(Provider.ID, Hospital.overall.rating)

cms.hospital.timely.score <- left_join(cms.hospital.timely.score, overall.score,
                                       by = "Provider.ID")

scores <- cms.hospital.timely.score%>%
  select(-c(Provider.ID, 
                    EDV,
                    OP_23,
                    OP_33,
                    OP_22,
                    PC_01,
                    OP_31,
                    OP_18c,
                    OP_29,
                    OP_30,
                    OP_3b,
                    VTE_6))%>%#EDV all NAs
  select(order(colnames(.)))


corr.matrix <- rcorr(as.matrix(scores, type = "pearson"))

corr.matrix.r <- corr.matrix$r
corr.matrix.r[lower.tri(corr.matrix.r, diag = F)]<-NA
pearson.r <- melt(corr.matrix.r)
pearson.r$value <- round(pearson.r$value, digits = 2)

corr.matrix.p <- corr.matrix$P
corr.matrix.p[lower.tri(corr.matrix.p, diag = T)]<-NA
pearson.p <- melt(corr.matrix.p)
pearson.p <- pearson.p%>%
  mutate(P.symbol = if_else(value<0.05, "*", NA_character_),
         P = value)%>%
  select(-value)
pearson.all <- left_join(pearson.r, pearson.p, 
                         by = c("Var1","Var2"))

pearson.table <- pearson.all %>% 
  filter(complete.cases(.))%>%
  filter(Var1 == "SEP_1" | Var2 == "SEP_1")%>%
  select(-P.symbol)%>%
  rename(Measure.ID = Var1,
         r = value)
pearson.table <- left_join(pearson.table, key,
                           by = "Measure.ID")
pearson.table <- pearson.table %>%
  mutate(Measure = if_else(Measure.ID == "Hospital.overall.rating", 
                           "Overall hospital rating", Measure))%>%
  select(Measure, r, P)

Hospital Level Analyses

To view R code select the button to the right.

national.sepsis.summary <- cms.hospital.timely%>%
  mutate(na = if_else(is.na(SEP_1)==T, 1, 0),
         n = if_else(is.na(SEP_1)==F, 1, 0))%>%
  dplyr::summarise(
    Total = nrow(.),
    N = sum(n),
    Missing = sum(na),
    Mean = mean(SEP_1, na.rm = T),
    SD = sd(SEP_1, na.rm = T),
    p10 = quantile(SEP_1, probs=0.1,na.rm = T),
    p25 = quantile(SEP_1, probs=0.25,na.rm = T),
    p50 = quantile(SEP_1, probs=0.5,na.rm = T),
    p75 = quantile(SEP_1, probs=0.75,na.rm = T),
    p90 = quantile(SEP_1, probs=0.9,na.rm = T),
    Min = min(SEP_1,na.rm = T), 
    Max = max(SEP_1,na.rm = T)
  )%>%
  gather()

kable(national.sepsis.summary, type="markdown", digits = 1, caption = "National SEP-1 Statistics")
National SEP-1 Statistics
key value
Total 4793.0
N 3070.0
Missing 1723.0
Mean 49.5
SD 19.2
p10 25.0
p25 36.0
p50 49.0
p75 63.0
p90 75.0
Min 0.0
Max 100.0
national.sepsis.sample.summary <- cms.hospital.timely%>%
  mutate(na = if_else(is.na(SEP1.Sample)==T, 1, 0),
         n = if_else(is.na(SEP1.Sample)==F, 1, 0))%>%
  dplyr::summarise(
    Mean.n = mean(SEP1.Sample, na.rm = T),
    SD.n = sd(SEP1.Sample, na.rm = T),
    p10.n = quantile(SEP1.Sample, probs=0.1,na.rm = T),
    p25.n = quantile(SEP1.Sample, probs=0.25,na.rm = T),
    p50.n = quantile(SEP1.Sample, probs=0.5,na.rm = T),
    p75.n = quantile(SEP1.Sample, probs=0.75,na.rm = T),
    p90.n = quantile(SEP1.Sample, probs=0.9,na.rm = T),
    Min.n = min(SEP1.Sample,na.rm = T), 
    Max.n = max(SEP1.Sample,na.rm = T)
  )%>%
  gather()

kable(national.sepsis.sample.summary, type="markdown", digits = 1, caption = "National Statistics of the Hospital Sample Sizes Used to Calculate Hospital SEP-1 Scores")
National Statistics of the Hospital Sample Sizes Used to Calculate Hospital SEP-1 Scores
key value
Mean.n 150.3
SD.n 143.1
p10.n 36.0
p25.n 72.0
p50.n 113.0
p75.n 170.0
p90.n 300.0
Min.n 11.0
Max.n 1431.0

Distribution of Hospital Patient Sample Sizes Used to Derive SEP-1 Score

Hospital Distribution of SEP-1 Scores

Correlation of SEP-1 Scores with Other Quality Metrics

Correlation of SEP-1 Scores with Select Other Quality Metrics
Measure r P
Median time-ED arrival to departure in admitted patients (ED_1b) -0.21 0.0000000
Time-Admit decision to ED departute in admitted patients (ED_2b) -0.14 0.0000000
Overall hospital rating 0.08 0.0000189
Immunization for influenza (IMM_2) 0.28 0.0000000
Median Time to Fibrinolysis (OP_1) -0.34 0.0015071
Median time-ED arrival to departure in discharged patients (OP_18b) -0.19 0.0000000
Fibrinolytic Therapy Received Within 30 Minutes of ED Arrival (OP_2) 0.32 0.0027567
Door to diagnostic eval (OP_20) -0.19 0.0000000
Median time to pain med (OP_21) -0.19 0.0000000
Aspirin at Arrival (OP_4) 0.26 0.0000000
Median Time to ECG (OP_5) -0.11 0.0000007

Hospital-Level Map

Select a circle to see the Hospital address, Hospital SEP-1 Score, and Sample Size used to create score.

The circle radius is equal to 100 x the sample size.


State Level Analyses

Now the hospital-level data that I have aggregated and summarized at level of the state.

To view R code select the button to the right.

state.sepsis.summary <- cms.hospital.timely%>%
  group_by(State)%>%
  mutate(na = if_else(is.na(SEP_1)==T, 1, 0),
         n = if_else(is.na(SEP_1)==F, 1, 0))%>%
  dplyr::summarise(
    N = sum(n),
    Missing = sum(na),
    Percent.Reporting = 100*N/(N+Missing),
    Mean = mean(SEP_1, na.rm = T),
    SD = sd(SEP_1, na.rm = T),
    p10 = quantile(SEP_1, probs=0.1,na.rm = T),
    p25 = quantile(SEP_1, probs=0.25,na.rm = T),
    p50 = quantile(SEP_1, probs=0.5,na.rm = T),
    p75 = quantile(SEP_1, probs=0.75,na.rm = T),
    p90 = quantile(SEP_1, probs=0.9,na.rm = T),
    Min = min(SEP_1,na.rm = T), 
    Max = max(SEP_1,na.rm = T)
  )%>%
  filter(complete.cases(.))%>%
  arrange(desc(Mean))

kable(state.sepsis.summary, type="markdown", digits = 1, caption = "State Level SEP-1 Statistics")
State Level SEP-1 Statistics
State N Missing Percent.Reporting Mean SD p10 p25 p50 p75 p90 Min Max
HI 13 10 56.5 63.2 13.0 50.4 53.0 64.0 75.0 79.6 43 81
FL 164 20 89.1 58.3 17.9 36.3 47.0 58.0 71.0 81.7 12 100
NJ 64 2 97.0 57.3 18.3 33.2 43.8 58.0 69.2 81.7 7 90
CA 281 60 82.4 55.8 18.6 33.0 44.0 55.0 69.0 80.0 4 100
MT 16 46 25.8 55.0 23.3 25.5 40.0 63.5 69.2 75.5 10 96
ME 19 14 57.6 54.6 19.9 26.6 40.5 57.0 66.5 81.2 20 87
NH 16 10 61.5 54.2 20.8 27.0 42.0 57.0 69.0 79.5 15 86
CO 48 32 60.0 53.8 16.7 35.5 46.2 56.0 62.2 71.2 0 91
ID 14 28 33.3 53.2 17.7 28.7 44.2 52.5 65.8 71.1 18 79
KS 42 94 30.9 52.9 21.1 32.1 38.0 54.0 67.2 81.7 7 100
SC 51 9 85.0 52.9 17.8 30.0 41.5 52.0 65.5 74.0 15 90
WY 11 17 39.3 52.6 19.3 35.0 38.5 46.0 70.0 72.0 23 82
AL 66 25 72.5 52.4 18.6 30.5 39.2 51.5 65.8 75.0 6 91
MD 44 5 89.8 52.4 16.4 32.9 39.8 51.0 61.5 74.8 22 92
NE 19 70 21.3 51.9 14.3 36.2 41.0 52.0 60.0 73.0 33 79
SD 11 47 19.0 51.7 18.6 25.0 37.5 56.0 65.5 72.0 23 76
NM 26 15 63.4 51.7 22.7 23.5 31.8 46.0 70.8 83.5 20 95
UT 33 13 71.7 51.6 12.9 37.2 43.0 51.0 61.0 65.8 23 79
IA 41 75 35.3 51.0 19.2 28.0 36.0 50.0 62.0 77.0 16 87
WI 71 55 56.3 50.7 16.6 28.0 39.0 51.0 63.0 73.0 14 80
TX 227 182 55.5 50.7 20.6 25.0 34.5 50.0 65.0 80.4 0 100
MA 51 12 81.0 50.6 15.2 35.0 40.0 47.0 62.5 73.0 19 83
VA 74 11 87.1 50.6 22.5 18.0 36.2 52.0 65.8 75.7 9 96
OK 58 65 47.2 50.1 21.3 22.9 37.0 48.5 65.0 74.3 0 96
NC 88 17 83.8 50.0 16.8 31.4 38.8 48.0 61.2 74.0 15 97
NV 21 14 60.0 49.6 17.4 33.0 39.0 43.0 58.0 73.0 29 94
PA 140 31 81.9 49.6 16.7 31.9 38.8 46.0 58.2 75.0 18 94
VT 6 8 42.9 49.3 12.5 34.5 43.2 53.0 57.5 60.5 29 62
WV 30 19 61.2 49.0 19.5 18.8 37.2 49.5 65.0 67.3 9 87
IL 132 48 73.3 48.9 18.6 27.1 36.8 50.0 60.2 72.0 0 95
TN 83 25 76.9 48.7 16.5 24.2 38.5 49.0 60.0 68.6 15 90
MS 45 50 47.4 47.1 19.6 26.8 35.0 43.0 55.0 78.8 9 89
NY 140 30 82.4 47.1 17.4 25.0 32.8 46.0 60.0 72.0 1 84
LA 63 56 52.9 47.0 21.0 20.0 34.0 48.0 63.5 72.8 0 83
IN 88 32 73.3 46.8 19.4 22.7 32.0 47.0 60.2 73.6 11 98
GA 89 43 67.4 46.4 17.1 25.0 34.0 47.0 60.0 69.2 10 80
MI 88 43 67.2 46.2 18.2 22.4 32.8 43.0 59.0 69.0 14 89
RI 11 0 100.0 46.2 21.0 25.0 33.0 39.0 63.0 75.0 19 79
CT 27 4 87.1 45.9 18.5 23.8 31.5 42.0 58.5 70.6 14 86
MN 50 80 38.5 45.4 15.0 30.8 34.0 42.5 59.0 67.0 13 72
OH 122 48 71.8 45.0 17.5 23.0 32.0 44.0 58.8 67.9 7 92
AR 44 31 58.7 44.5 18.8 22.9 33.0 45.5 54.0 66.7 2 94
OR 45 15 75.0 43.2 20.3 19.4 30.0 40.0 61.0 74.6 14 86
MO 76 36 67.9 42.8 22.5 20.0 27.0 34.5 57.2 78.5 0 100
DE 6 1 85.7 42.5 12.1 33.0 33.8 37.0 49.2 57.5 33 62
KY 62 29 68.1 42.2 16.8 21.1 33.0 40.5 48.5 68.8 8 88
AZ 52 26 66.7 42.1 14.5 26.0 33.8 42.0 49.2 59.6 13 84
WA 52 38 57.8 42.1 16.4 21.1 30.5 44.0 54.0 59.9 6 93
AK 11 11 50.0 40.0 18.0 20.0 32.5 41.0 47.5 64.0 7 70
ND 7 37 15.9 39.9 26.3 17.4 19.5 34.0 52.0 71.4 15 87
DC 7 1 87.5 33.0 22.8 12.6 21.0 30.0 37.5 54.0 6 78
PR 22 30 42.3 13.3 20.6 0.0 0.0 7.0 13.8 43.6 0 76
VI 2 0 100.0 9.0 4.2 6.6 7.5 9.0 10.5 11.4 6 12
state.sepsis.sample.summary <- cms.hospital.timely%>%
  group_by(State)%>%
  mutate(na = if_else(is.na(SEP1.Sample)==T, 1, 0),
         n = if_else(is.na(SEP1.Sample)==F, 1, 0))%>%
  dplyr::summarise(
    N = sum(n),
    Missing = sum(na),
    Percent.Reporting = 100*N/(N+Missing),
    Mean.n = mean(SEP1.Sample, na.rm = T),
    SD.n = sd(SEP1.Sample, na.rm = T),
    p10.n = quantile(SEP1.Sample, probs=0.1,na.rm = T),
    p25.n = quantile(SEP1.Sample, probs=0.25,na.rm = T),
    p50.n = quantile(SEP1.Sample, probs=0.5,na.rm = T),
    p75.n = quantile(SEP1.Sample, probs=0.75,na.rm = T),
    p90.n = quantile(SEP1.Sample, probs=0.9,na.rm = T),
    Min.n = min(SEP1.Sample,na.rm = T), 
    Max.n = max(SEP1.Sample,na.rm = T)
  )%>%
  filter(complete.cases(.))%>%
  arrange(desc(Mean.n))

kable(state.sepsis.sample.summary, type="markdown", digits = 1, caption = "State Level Statistics of Hospital Sample Sizes Used to Calculate SEP-1 Scores")
State Level Statistics of Hospital Sample Sizes Used to Calculate SEP-1 Scores
State N Missing Percent.Reporting Mean.n SD.n p10.n p25.n p50.n p75.n p90.n Min.n Max.n
HI 13 10 56.5 282.4 264.4 80.0 101.0 176.0 494.0 648.0 17 834
DE 6 1 85.7 249.5 248.8 106.0 121.2 138.5 237.5 504.0 92 742
PA 140 31 81.9 217.6 197.4 36.0 87.5 167.5 283.2 427.4 11 1359
NV 21 14 60.0 212.5 283.8 70.0 102.0 137.0 160.0 438.0 24 1346
MD 44 5 89.8 212.4 176.3 80.8 100.8 125.5 264.8 489.5 38 716
FL 164 20 89.1 190.3 173.4 66.2 91.0 130.0 206.5 426.7 12 937
NC 88 17 83.8 176.9 179.3 49.4 79.8 114.0 219.2 371.5 11 1376
NJ 64 2 97.0 175.1 124.5 63.7 97.5 134.0 224.8 268.1 14 700
ND 7 37 15.9 172.0 132.0 64.8 108.5 128.0 203.0 312.6 21 432
OH 122 48 71.8 165.6 194.1 47.2 73.8 105.5 150.8 411.6 11 1186
WV 30 19 61.2 164.8 159.9 28.4 47.5 85.0 260.5 361.6 12 671
DC 7 1 87.5 162.0 69.7 98.0 108.5 134.0 213.5 252.6 92 264
MS 45 50 47.4 161.8 177.9 25.0 44.0 96.0 207.0 384.8 17 814
CA 281 60 82.4 160.7 126.2 61.0 93.0 133.0 179.0 296.0 11 1060
VA 74 11 87.1 160.1 112.1 66.2 82.5 132.5 206.2 270.9 22 679
IN 88 32 73.3 159.0 155.3 38.4 63.5 108.0 178.2 350.1 11 818
ID 14 28 33.3 158.6 152.1 19.7 36.5 101.5 266.8 391.8 12 452
MI 88 43 67.2 157.5 149.4 49.3 80.0 125.5 180.0 265.9 11 1215
TN 83 25 76.9 156.6 171.1 36.0 75.0 108.0 163.0 306.4 11 848
KY 62 29 68.1 154.5 163.3 34.6 65.2 110.0 140.8 314.9 11 826
SC 51 9 85.0 152.5 118.6 55.0 71.5 125.0 184.5 309.0 12 599
NY 140 30 82.4 151.3 122.3 60.9 86.0 120.0 167.5 289.0 14 997
GA 89 43 67.4 151.2 126.4 34.6 73.0 116.0 170.0 334.6 12 630
TX 227 182 55.5 150.1 167.9 28.2 71.0 111.0 158.0 266.6 11 1431
VT 6 8 42.9 145.5 77.0 70.5 97.0 138.0 197.0 228.0 46 251
SD 11 47 19.0 141.1 162.1 49.0 66.0 93.0 122.0 180.0 43 615
AL 66 25 72.5 141.0 144.9 24.5 47.2 91.0 183.2 334.0 11 695
CT 27 4 87.1 140.5 64.9 71.8 105.0 121.0 156.0 244.6 61 320
IL 132 48 73.3 137.3 104.0 35.1 78.5 118.5 162.2 279.1 11 671
NM 26 15 63.4 137.2 127.0 44.0 82.0 101.0 139.5 250.0 16 577
NE 19 70 21.3 135.6 124.0 58.6 74.5 102.0 132.5 202.8 30 589
CO 48 32 60.0 133.8 102.1 27.5 76.0 118.5 161.0 230.3 11 611
WA 52 38 57.8 131.7 77.4 40.2 77.8 120.0 172.2 204.3 15 394
MT 16 46 25.8 130.7 134.3 24.0 41.5 91.5 146.0 314.5 12 483
OR 45 15 75.0 129.4 96.9 39.8 66.0 98.0 150.0 283.8 21 453
ME 19 14 57.6 123.7 106.3 32.6 60.5 83.0 131.0 289.0 23 410
AZ 52 26 66.7 123.4 61.6 46.3 85.0 119.5 144.5 198.2 26 330
RI 11 0 100.0 120.9 127.7 28.0 47.0 98.0 133.5 160.0 27 480
NH 16 10 61.5 120.3 107.9 20.0 59.2 96.5 140.2 208.5 13 450
OK 58 65 47.2 118.7 114.4 23.1 47.2 101.0 136.5 225.8 11 753
MO 76 36 67.9 118.5 91.0 27.0 59.2 114.0 149.0 204.5 11 546
LA 63 56 52.9 112.3 110.2 22.0 45.0 90.0 133.0 227.2 12 747
MA 51 12 81.0 111.2 65.0 57.0 67.5 90.0 124.0 210.0 33 309
KS 42 94 30.9 110.1 94.0 24.7 45.5 79.0 128.5 286.1 11 344
AR 44 31 58.7 103.8 94.7 26.6 42.8 81.5 130.0 185.8 11 426
WI 71 55 56.3 97.6 58.8 35.0 65.0 89.0 118.0 170.0 12 329
IA 41 75 35.3 97.0 86.1 21.0 34.0 75.0 116.0 205.0 12 373
AK 11 11 50.0 96.5 68.1 17.0 35.0 103.0 130.0 169.0 15 227
UT 33 13 71.7 93.8 91.9 14.4 37.0 85.0 104.0 161.8 11 514
MN 50 80 38.5 89.5 47.9 40.3 66.0 81.5 105.8 152.1 11 249
WY 11 17 39.3 85.8 71.9 22.0 33.0 70.0 113.0 196.0 13 231
PR 22 30 42.3 81.5 102.5 17.4 27.2 51.5 66.0 152.7 12 435
VI 2 0 100.0 25.5 10.6 19.5 21.8 25.5 29.2 31.5 18 33

State’s Percent Hospitals Reporting SEP-1 Score

State’s Mean Hospital Sample Sizes Used to Derive SEP-1 Score

State’s Mean Hospital SEP-1 Scores

Below I analyze each state’s Mean SEP-1 score to examine national-level statistics from state means rather than all the hospitals in the US as I did above.

national.states.sepsis.summary <- state.sepsis.summary%>%
  dplyr::summarise(
    States.Mean = mean(Mean, na.rm = T),
    States.SD = sd(Mean, na.rm = T),
    States.p10 = quantile(Mean, probs=0.1,na.rm = T),
    States.p25 = quantile(Mean, probs=0.25,na.rm = T),
    States.p50 = quantile(Mean, probs=0.5,na.rm = T),
    States.p75 = quantile(Mean, probs=0.75,na.rm = T),
    States.p90 = quantile(Mean, probs=0.9,na.rm = T),
    States.Min = min(Mean,na.rm = T), 
    States.Max = max(Mean,na.rm = T)
  )%>%
  arrange(desc(States.Mean))

kable(national.states.sepsis.summary, type="markdown", digits = 1, caption = "National Summary of States' SEP-1 Means")
National Summary of States’ SEP-1 Means
States.Mean States.SD States.p10 States.p25 States.p50 States.p75 States.p90 States.Min States.Max
47.6 9 42.1 45.4 49.6 52.4 54.6 9 63.2
national.states.sepsisreoprting.summary <- state.sepsis.summary%>%
  dplyr::summarise(
    Reporting.Mean = mean(Percent.Reporting, na.rm = T),
    Reporting.SD = sd(Mean, na.rm = T),
    Reporting.p10 = quantile(Percent.Reporting, probs=0.1,na.rm = T),
    Reporting.p25 = quantile(Percent.Reporting, probs=0.25,na.rm = T),
    Reporting.p50 = quantile(Percent.Reporting, probs=0.5,na.rm = T),
    Reporting.p75 = quantile(Percent.Reporting, probs=0.75,na.rm = T),
    Reporting.p90 = quantile(Percent.Reporting, probs=0.9,na.rm = T),
    Reporting.Min = min(Percent.Reporting,na.rm = T), 
    Reporting.Max = max(Percent.Reporting,na.rm = T)
  )%>%
  arrange(desc(Reporting.Mean))

kable(national.states.sepsisreoprting.summary, type="markdown", digits = 1, caption = "National Summary of States' Reporting of SEP-1 Scores")
National Summary of States’ Reporting of SEP-1 Scores
Reporting.Mean Reporting.SD Reporting.p10 Reporting.p25 Reporting.p50 Reporting.p75 Reporting.p90 Reporting.Min Reporting.Max
63.4 9 33.7 50 66.7 81.9 87.4 15.9 100

State-Level Map

Hover over state to see the state’s mean SEP-1 Score.

Comparison

CMS publishes their own statistics aggregated at the level of the state. I wanted to compare my state-level statistics, derived from CMS nationwide hospital-level statistics, with the ones calculated and supplied by CMS. Overall they are similar, but some minor differences.

Comparison of State Level SEP-1 Statistics
State CMS.Score My.Mean My.Median
HI 68 63.2 64.0
ID 62 53.2 52.5
NH 61 54.2 57.0
FL 57 58.3 58.0
MT 57 55.0 63.5
NJ 57 57.3 58.0
CO 56 53.8 56.0
WY 56 52.6 46.0
MD 55 52.4 51.0
CA 54 55.8 55.0
KS 54 52.9 54.0
ME 53 54.6 57.0
SC 53 52.9 52.0
AL 52 52.4 51.5
UT 52 51.6 51.0
WV 52 49.0 49.5
NC 51 50.0 48.0
NM 51 51.7 46.0
ND 50 39.9 34.0
OK 50 50.1 48.5
TN 50 48.7 49.0
TX 50 50.7 50.0
IL 49 48.9 50.0
MA 49 50.6 47.0
VT 49 49.3 53.0
WI 49 50.7 51.0
AR 48 44.5 45.5
IA 48 51.0 50.0
MS 48 47.1 43.0
AK 47 40.0 41.0
GA 47 46.4 47.0
KY 47 42.2 40.5
MI 47 46.2 43.0
NE 47 51.9 52.0
SD 47 51.7 56.0
NV 46 49.6 43.0
NY 46 47.1 46.0
OH 46 45.0 44.0
PA 46 49.6 46.0
VA 46 50.6 52.0
LA 45 47.0 48.0
MN 45 45.4 42.5
OR 45 43.2 40.0
AZ 44 42.1 42.0
CT 44 45.9 42.0
IN 44 46.8 47.0
MO 44 42.8 34.5
WA 42 42.1 44.0
RI 41 46.2 39.0
DC 37 NA NA
DE 37 42.5 37.0
PR 11 NA NA
AS NA NA NA
GU NA NA NA
MP NA NA NA
VI NA NA NA