res_hist: Histogram Plot of the Residuals Values

View source: R/forecast_tools.R

res_histR Documentation

Histogram Plot of the Residuals Values

Description

Histogram plot of the residuals values

Usage

res_hist(forecast.obj)

Arguments

forecast.obj

A fitted or forecasted object (of the forecast package) with residuals output

Examples

## Not run: 
library(forecast)
data(USgas)

# Set the horizon of the forecast
h <- 12

# split to training/testing partition
split_ts <- ts_split(USgas, sample.out  = h)
train <- split_ts$train
test <- split_ts$test

# Create forecast object
fc <- forecast(auto.arima(train, lambda = BoxCox.lambda(train)), h = h)

# Plot the fitted and forecasted vs the actual values
res_hist(forecast.obj = fc)

## End(Not run)

TSstudio documentation built on Aug. 9, 2023, 9:06 a.m.