Learn R Programming

TSstudio (version 0.1.7)

res_hist: 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

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab