Skip to contents

The training window GROWS: every fold starts at index 0, so no history is ever discarded.

Usage

morie_expandcv(n, initial, testsize, step = NULL)

Arguments

n

number of observations

initial

first training window length

testsize

test window length

step

how far the training end advances; defaults to testsize

Value

list(folds, nfolds, initial, testsize, step, firsttrainend, lasttrainend)

Examples

morie_expandcv(n = 50, initial = 30, testsize = 5)
#> $folds
#> $folds[[1]]
#> [1]  0 30 30 35
#> 
#> $folds[[2]]
#> [1]  0 35 35 40
#> 
#> $folds[[3]]
#> [1]  0 40 40 45
#> 
#> $folds[[4]]
#> [1]  0 45 45 50
#> 
#> 
#> $nfolds
#> [1] 4
#> 
#> $initial
#> [1] 30
#> 
#> $testsize
#> [1] 5
#> 
#> $step
#> [1] 5
#> 
#> $firsttrainend
#> [1] 30
#> 
#> $lasttrainend
#> [1] 45
#>