Learn R Programming

PandemicLP (version 1.3.0)

print.pandemicPredicted: Prints prediction summary of pandemic model

Description

S3 method designed to summarize the prediction obtained by the posterior_predict.pandemicEstimated function. It is not necessary to call function directly, unless it is desired to change the default arguments.

Usage

# S3 method for pandemicPredicted
print(x, summaryFun = stats::median, printPred = "Long", truncView = 3, ...)

Arguments

x

An object of S3 class pandemicPredicted-objects.

summaryFun

Use this function to summarize the predictions. Default argument is median, but can be any function on a vector.

printPred

Valid values are 'Long' or 'Short'. Note that 'Short' will show short-term cumulative predictions, while 'Long' will return the long-term daily cases predicted.

truncView

How many predictions to print. Default is 3, which means that the method prints the first 3 days predicted and the last 3 days of the prediction horizon.

...

Currently unused.

See Also

posterior_predict.pandemicEstimated and plot.pandemicPredicted.

Examples

Run this code
# NOT RUN {
dataMG = load_covid("Brazil","MG")
estimMG = pandemic_model(dataMG)
predMG = posterior_predict(estimMG)
print(predMG, summaryFun = mean, truncView = 5)
# }

Run the code above in your browser using DataLab