karma.rfpermute: Autoregressive Random Forest with random permutations for...

Description Usage Arguments Value See Also Examples

Description

Autoregressive Random Forest with random permutations for variable selection

Usage

1
2
karma.rfpermute(y, ar_terms = NULL, seasonality = F, xreg = NULL,
  plot = T, stdout = F)

Arguments

ar_terms

Number of lagged terms to include as features

seasonality

Flag to indicate seasonal or nonseasonal series (T/F)

xreg

Features

plot

Show training convergence plot (T/F)

stdout

Print messages to standard output (T/F)

yt

Univariate time series object

Value

Trained forest with empirical p-values

See Also

tseries, forecast

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
yt = diff(log(JohnsonJohnson))

#Train model:
rf0 = tsml.rfPermute( y = yt, ar_terms = 15 )

#Get model p-values:
print(rf0$pval)

#Forecast:
tsml.forecast(rf0, h = 12, plot = T)

#Test 70-30:
tsml.cv(rf0, test_pct = 12, test_type = "window")

snarf-snarf/karma documentation built on May 24, 2019, 7:19 a.m.