Takes the output of gp_opts()
and converts it into a list understood by
stan
.
Usage
create_gp_data(gp = gp_opts(), data)
Examples
# define input data required
data <- list(
t = 30,
seeding_time = 7,
horizon = 7
)
# default gaussian process data
create_gp_data(data = data)
#> $t
#> [1] 30
#>
#> $seeding_time
#> [1] 7
#>
#> $horizon
#> [1] 7
#>
#> $fixed
#> [1] 0
#>
#> $M
#> numeric(0)
#>
#> $L
#> [1] 1.5
#>
#> $ls_meanlog
#> [1] 2.991842
#>
#> $ls_sdlog
#> [1] 0.3245928
#>
#> $ls_min
#> [1] 0
#>
#> $ls_max
#> [1] 16
#>
#> $alpha_sd
#> [1] 0.05
#>
#> $gp_type
#> [1] 0
#>
# settings when no gaussian process is desired
create_gp_data(NULL, data)
#> $t
#> [1] 30
#>
#> $seeding_time
#> [1] 7
#>
#> $horizon
#> [1] 7
#>
#> $stationary
#> [1] 1
#>
#> $fixed
#> [1] 1
#>
#> $M
#> numeric(0)
#>
#> $L
#> [1] 1.5
#>
#> $ls_meanlog
#> [1] 2.991842
#>
#> $ls_sdlog
#> [1] 0.3245928
#>
#> $ls_min
#> [1] 0
#>
#> $ls_max
#> [1] 16
#>
#> $alpha_sd
#> [1] 0.05
#>
#> $gp_type
#> [1] 0
#>
# custom lengthscale
create_gp_data(gp_opts(ls_mean = 14), data)
#> $t
#> [1] 30
#>
#> $seeding_time
#> [1] 7
#>
#> $horizon
#> [1] 7
#>
#> $fixed
#> [1] 0
#>
#> $M
#> numeric(0)
#>
#> $L
#> [1] 1.5
#>
#> $ls_meanlog
#> [1] 2.527486
#>
#> $ls_sdlog
#> [1] 0.4723807
#>
#> $ls_min
#> [1] 0
#>
#> $ls_max
#> [1] 16
#>
#> $alpha_sd
#> [1] 0.05
#>
#> $gp_type
#> [1] 0
#>