plot.visitation_forecast {VisitorCounts} | R Documentation |
visitation_forecast Plot Methods
Description
Methods for plotting objects of the class "visitation_forecast".
Usage
## S3 method for class 'visitation_forecast'
plot(
x,
difference = FALSE,
log_outputs = FALSE,
actual_visitation = NULL,
xlab = "Time",
ylab = "Fitted Value",
pred_color = "#228B22",
actual_color = "#FF0000",
size = 1.5,
main = "Forecasts for Visitation Model",
plot_points = FALSE,
...
)
Arguments
x |
An object of class "visitation_forecast". |
difference |
A Boolean specifying whether to plot the original fit or differenced series. The default option is FALSE, in which case, the series is not differenced. |
log_outputs |
A Boolean specifying whether to plot the outputs in standard scale or the logged outputs |
actual_visitation |
A time series object representing the actual visitation in the standard scale |
xlab |
A String to overwrite the x label of the graph |
ylab |
A String to overwrite the y label of the graph |
pred_color |
A String to specify the color of the line for predicted visitation |
actual_color |
A String to specify the color of the line for actual visitation |
size |
A number representing the size of the line to plot. |
main |
A String to overwrite the main label of the graph |
plot_points |
A Boolean specifying whether to plot the individual points of visitation |
... |
Additional arguments. |
Value
No return value, called for plotting objects of the class "visitation_forecast".
Examples
#' #Example:
data("park_visitation")
data("flickr_userdays")
n_ahead <- 12
park <- "YELL"
pud_ts <- ts(park_visitation[park_visitation$park == park,]$pud, start = 2005, freq = 12)
pud_ts <- log(pud_ts)
trend_proxy <- log(flickr_userdays)
mf <- visitation_model(pud_ts,trend_proxy)
vf <- predict(mf,12, only_new = TRUE)
plot(vf)