stsm_detect_multiplicative {autostsm}R Documentation

Detect if log transformation is best

Description

Detect if log transformation is best

Usage

stsm_detect_multiplicative(y, freq, sig_level = 0.01, prior = NULL)

Arguments

y

an object created from stsm_detect_frequency

freq

Frequency of the data

sig_level

Significance level to determine statistically significant seasonal frequencies

prior

A data table created by stsm_prior

Value

a logical indicating if the model should be multiplicative or not

Examples

## Not run: 
#GDP Not seasonally adjusted
library(autostsm)
data("NA000334Q", package = "autostsm") #From FRED
NA000334Q = data.table(NA000334Q, keep.rownames = TRUE)
colnames(NA000334Q) = c("date", "y")
NA000334Q[, "date" := as.Date(date)]
NA000334Q[, "y" := as.numeric(y)]
NA000334Q = NA000334Q[date >= "1990-01-01", ]
multiplicative = stsm_detect_multiplicative(y = NA000334Q$y, freq = 4)

## End(Not run)

[Package autostsm version 2.0 Index]