run_meta: obtain input to rmeta meta.summaries, metaplot

Description Usage Arguments Examples

View source: R/dometa.R

Description

obtain input to rmeta meta.summaries, metaplot

Usage

1
run_meta(nyd, opt_parms, ...)

Arguments

nyd

tibble, data source assumed to be nytimes_state_data()

opt_parms

list, such as that produced by min_bic_all_states()

...

passed to Arima_by_state

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
nyd = nytimes_state_data()
data(min_bic_2020_11_26_death)
m1 = run_meta(nyd, opt_parms=min_bic_2020_11_26_death) # must be relatively current
rmeta::meta.summaries(m1$drifts, m1$se.drifts)
names(m1$drifts) = gsub(".drift", "", names(m1$drifts))
nyind = which(names(m1$drifts) %in% c("New York", "New Jersey"))
rmeta::meta.summaries(m1$drifts[-nyind], m1$se.drifts[-nyind])
o = order(m1$drifts)
rmeta::metaplot(m1$drifts[o], m1$se.drifts[o], labels=names(m1$drifts)[o], cex=.7, 
  xlab="Infection velocity (CHANGE in number of confirmed cases/day)", ylab="State")
segments(rep(-350,46), seq(-49,-4), rep(-50,46), seq(-49,-4), lty=3, col="gray")

vjcitn/sars2death documentation built on Jan. 1, 2021, 12:41 p.m.