tsforc_data: To plot the linear forecast of an ARIMA model of a time...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

This function allows to create a plot which contains a linear forecast, based on pre-selected ARIMA model.

Usage

1
2
3
4
5
6
7
8
tsforc_data(
  ts_arima,
  n_period = 4,
  vctconf_interv = c(80, 95),
  title = "FORECAST PLOT",
  xname = "Dates",
  yname = "Values"
)

Arguments

ts_arima

A univariate time series with class 'Arima' object.

n_period

A number refferred to the period of the forecast expressed in quarters (default= 4)

vctconf_interv

A numeric vector with two elements which refer to the lower and upper limits of the confidence interval of the forecast, respectively (default= c(80,95)).

title

A character string for the title of the plot (default="FORECAST PLOT").

xname

A character string for the label of the x-axe (default="Dates").

yname

A character string for the label of the y-axe (default="Values").

Value

The plot of the forecast.

Examples

1
2
3
4
dataset<-data.frame('something'=c(...))
dataset_ts<-ts(dataset, ...)
arimamodel_ts<-autoparam_tsarima(dataset_ts[,1])
tsforc_data(arimamodel_ts, 8)

unimi-dse/9768672c documentation built on Feb. 16, 2020, 5:45 a.m.