plot_sf_weekly: Plot factors by week

View source: R/plot_sf_weekly.r

plot_sf_weeklyR Documentation

Plot factors by week

Description

Generate a multi-panel plot of seasonal factors by week

Usage

plot_sf_weekly(
  this_sf,
  this_week,
  forecast = 0,
  this_trans = TRUE,
  this_range = NULL,
  this_type = "Seasonal",
  this_title
)

Arguments

this_sf

Numeric vector of seasonal factors.

this_week

Numeric vector; Week of the year to match.

forecast

Numeric scalar; Number of forecasts. Default: 0.

this_trans

Logical scalar; set to TRUE if the log transformation is used in the decomposition, FALSE otherwise. Default: TRUE

this_range

Numeric scalar; Range of the seasonal factors to be plotted. Default: range taken from the observations being plotted.

this_type

Character string; type of factor being plotted. Default: 'Seasonal'

this_title

Character string; Main title for plot.

Value

Generate a mulit-panel plot of seasonal factors by week. Need to have plot_sf_weekly_single loaded to run.

Examples

ic_sf_range <- range(ic_sf, ic_sf_auto, ic_sf_auto_ljung, ic_sf_tc)
plot_sf_weekly(ic_sf, 
               this_week = ic_week,  
               forecast = 0,
               this_range = ic_sf_range,  
               this_trans = FALSE,  
               this_type = 'Combined',
               this_title = 'Initial Claims (default)')
plot_sf_weekly(ic_sf_auto,  
               this_week = ic_week,  
               forecast=0,
               this_range = ic_sf_range,  
               this_trans = FALSE,  
               this_type = 'Combined',
               this_title = 'Initial Claims (auto)')
plot_sf_weekly(ic_sf_auto_ljung,  
               this_week = ic_week,  
               forecast=0,
               this_range = ic_sf_range,  
               this_trans = FALSE,  
               this_type = 'Combined',
               this_title = 'Initial Claims (auto, ljung cv)')
plot_sf_weekly(ic_sf_tc,  
               this_week = ic_week,  
               forecast=0,
               this_range = ic_sf_range,  
               this_trans = FALSE,  
               this_type = 'Combined',
               this_title = 'Initial Claims (fractional airline)')

bcmonsell/airutilities documentation built on May 16, 2022, 3:23 p.m.