Skip to contents

Generic function to format the seasonal adjustment decomposition components. sa_decomposition() is a generic function defined in other packages.

Usage

sadecomposition(y, sa, t, s, i, mul)

# S3 method for class 'JD3_SADECOMPOSITION'
print(x, n_last_obs = frequency(x$series), ...)

# S3 method for class 'JD3_SADECOMPOSITION'
plot(
  x,
  first_date = NULL,
  last_date = NULL,
  type_chart = c("sa-trend", "seas-irr"),
  caption = c(`sa-trend` = "Y, Sa, trend", `seas-irr` = "Sea., irr.")[type_chart],
  colors = c(y = "#F0B400", t = "#1E6C0B", sa = "#155692", s = "#1E6C0B", i = "#155692"),
  ...
)

sa_decomposition(x, ...)

Arguments

y, sa, t, s, i, mul

seasonal adjustment decomposition parameters.

x

the object to print.

n_last_obs

number of observations to print (by default equal to the frequency of the series).

...

further arguments.

first_date, last_date

first and last date to plot (by default all the data is used).

type_chart

the chart to plot: "sa-trend" (by default) plots the input time series, the seasonally adjusted and the trend; "seas-irr" plots the seasonal and the irregular components.

caption

the caption of the plot.

colors

the colours used in the plot.

Value

"JD3_SADECOMPOSITION" object.