ml_test: Apply ML-based hypothesis test to a bank of time series

Description Usage Arguments Value Author(s) Examples

View source: R/ml_test.R

Description

Apply ML-based hypothesis test to a bank of time series

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ml_test(
  bank,
  pvalue = 0.05,
  custom_model,
  original = TRUE,
  verdicts = 1,
  run_par = TRUE,
  num_cores = -9999,
  fanfare = FALSE
)

Arguments

bank

List object with at least one time series

pvalue

A numeric value indicating the desired p-value. (Default = 0.05) To retrieve the best accuracy, enter "-9999".

custom_model

A unitrootML model object with a custom-trained model. Note that a custom model is used only when original is set to TRUE and a unitrootML model object is supplied. (Default = NULL)

original

Boolean indicating whether to use default model or a custom model. The default model is a gradient boost model with a sensitivity rated at 0.924 and specificity rated at 0.952. (Default = TRUE)

verdicts

Integer indicating whether to (1) report only ML model verdicts, (2) both ML and test statistic verdicts based on thresholds calibrated from selected cost ratio. (Default = 1)

run_par

Boolean indicating whether to compute in parallel (Default = TRUE).

num_cores

Number of logical cores to use for parallel processing. -9999 indicates maximum allowed minus one. Otherwise, provide an integer. (Default = -9999).

fanfare

Boolean indicating whether to print results (Default = FALSE).

Value

A unitrootML object containing test results

Author(s)

Gary Cornwall and Jeffrey Chen

Examples

1
ml_test(list(ts(rnorm(120, 10,10), freq=12)), pvalue = 0.05)

DataScienceForPublicPolicy/unitrootML documentation built on Dec. 17, 2021, 4:07 p.m.