Learn R Programming

RcmdrPlugin.RiskDemo (version 3.2)

plotForecast: Forecasting new covid cases

Description

This function forecasts the numbers of new covid cases using a simple linear state space model.

Usage

plotForecast(data, region, start = NULL, end = NULL, np = 30, predInt = 0.95, 
    log = TRUE)

Value

No value.

Arguments

data

data frame including columns Aika (character string indicating the date), Alue (character string indicating the region) and val (numeric indicating the number of new cases)

region

characters string indicating the region for which the forecast is made

start

beginning date of the observations used in the estimation of the forecasting model

end

ending date of the observations used in the estimation of the forecasting model

np

integer indicating the forecasting horizon in days

predInt

decimal indicating the probability of the forecasting interval

log

logical indicating if a log scale is used in the plot

Author

Arto Luoma <arto.luoma@wippies.com>

See Also

plotR, dataCovidFin

Examples

Run this code
data(dataCovidFin)
plotForecast(data=dataCovidFin, region='All regions', start="2020-09-01")

Run the code above in your browser using DataLab