Learn R Programming

VisitorCounts (version 2.0.3)

plot.visitation_forecast: visitation_forecast Plot Method

Description

Methods for plotting objects of the class "visitation_forecast".

Usage

# S3 method for visitation_forecast
plot(x, type = c("fitted"), difference = FALSE, ...)

Value

No return value, called for plotting objects of the class "visitation_forecast".

Arguments

x

An object of class "decomposition".

type

A character string. One of "full","period", or "classical". If "full", the full reconstruction is plotted. If "period", the reconstruction of each period is plotted individually. If "classical", the trend and seasonality are plotted.

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.

...

Additional arguments.

Examples

Run this code
#' #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)

Run the code above in your browser using DataLab