jd_checklast: Checking of the last observations (Terror-like)

Description Usage Arguments Value Examples

View source: R/jd_outliers.R

Description

jd_checklast is a straightforward implementation of Terror, a popular tool for detecting anomalies in the last observation(s). This function compares the out of sample forecasts of the series with the actual figures.It returns the difference in function of the standard error of the forecast.

Usage

1
jd_checklast(s,last, method,absoluteErrors)

Arguments

s

series

last

number of observations (default=1)

method

tramo method used to compute the forecast (default= "TRfull")

absoluteErrors

return result as absolute error (vs relative error; default= FALSE)

Value

returns a numeric vector

Examples

1
2
3
4
data("retail")
myseries <- retail$AutomobileDealers
checkLastObservations <-jd_checklast(myseries,4)
checkLastObservations_abs <-jd_checklast(myseries,4,absoluteErrors = TRUE)

nbbrd/jdemetra-jdlight documentation built on May 21, 2019, 8:38 a.m.