min_bic: minimize BIC for ARIMA models with default differencing order...

Description Usage Arguments Examples

View source: R/Arima.R

Description

minimize BIC for ARIMA models with default differencing order 1 over choices of MA and AR order

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
min_bic(
  src,
  fullusa = FALSE,
  state.in = "New York",
  county.in = NULL,
  parms = grid_2d(5),
  max_date = NULL,
  lookback_days = 29,
  ...
)

Arguments

src

tibble with cumulative incidence like output of nytimes_state_data()

fullusa

logical(1) if TRUE, use Arima_nation (src should be enriched_jhu_data())

state.in

character(1) state name

county.in

character(1) county name, defaults to NULL, but if supplied, focus on county-level data

parms

two-column data frame with proposed AR order in column 1 and MA order in column 2

max_date

character(1) or lubridate date from which to look back

lookback_days

numeric(1)

...

passed to Arima_by_state or Arima_by_county

Examples

1
2
3
4
5
6
nyd = nytimes_state_data()
mb = min_bic(nyd, state.in="New York")
names(mb)
nytc = nytimes_county_data()
mb2 = min_bic(nytc, state.in="Massachusetts", county.in="Norfolk")
names(mb2)

vjcitn/sars2app documentation built on Jan. 3, 2022, 12:19 a.m.