plot.visitation_model {VisitorCounts}R Documentation

visitation_model Plot Methods

Description

Methods for plotting objects of the class "decomposition".

Usage

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

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.

Value

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

Examples



data("park_visitation")
data("flickr_userdays")

park <- "YELL"
pud_ts <- ts(park_visitation[park_visitation$park == park,]$pud, start = 2005, freq = 12)
pud_ts <- log(pud_ts)

nps_ts <- ts(park_visitation[park_visitation$park == park,]$nps, start = 2005, freq = 12)
nps_ts <- log(nps_ts)

nps_decomp <- auto_decompose(nps_ts)

trend_proxy <- log(flickr_userdays)

vm <- visitation_model(pud_ts,trend_proxy,ref_series = nps_ts)
plot(vm)

[Package VisitorCounts version 2.0.0 Index]