plot.pandemicPredicted: Plot pandemic predictions

View source: R/plot.pandemicPredicted.R

plot.pandemicPredictedR Documentation

Plot pandemic predictions

Description

S3 method that plots the predicted data into an interactive graphic.

Usage

## S3 method for class 'pandemicPredicted'
plot(x, y, term = "long", color = TRUE, summary = TRUE, ...)

Arguments

x

Output of function posterior_predict.pandemicEstimated.

y

This parameter does nothing

term

A string which indicates whether long term, short term or both plots should be generated. The argument must be a string being either 'long', 'short' or 'both'.

color

A logical variable indicating whether the plot should be colorful or in gray scales. If TRUE then the plot is colorful otherwise the plot will be gray.

summary

A logical variable indicating whether the plot should contains the summary statistics about the pandemic or not. If TRUE then the plot shows the statistics otherwise no.

...

Currently unused.

Value

A list containing two objects, short and long. "long" shows the long-term predictions and "short" the short-term predictions. If any of them did not get plotted due to lack of prediction or due to the term argument, its value will return NULL.

By default only the long-term plot is generated, which means that the short term plot returns NULL. This is changed with the term argument.

long

The plotted long-term prediction. The predictions are made on daily new confirmed cases or daily new deaths.

short

The plotted short-term prediction. The predictions are made on daily cumulative cases or daily cumulative deaths.

References

CovidLP Team, 2020. CovidLP: Short and Long-term Prediction for COVID-19. Departamento de Estatistica. UFMG, Brazil. URL: http://est.ufmg.br/covidlp/home/en/

See Also

posterior_predict.pandemicEstimated, pandemic_stats and plottedPandemic-objects.

Examples

## Not run: 
dataMG = load_covid("Brazil","MG")
estimMG = pandemic_model(dataMG)
predMG = posterior_predict(estimMG)
statsMG = pandemic_stats(predMG)
plot(predMG)
## End(Not run)

PandemicLP documentation built on March 18, 2022, 6:22 p.m.