Model selection with BIC criterion.
BIC_model_choice(Ks, iter, data, verbose = T)
a numerical vector containing the K values.
an integer, the number of iteration for each run of fit_Bliss
.
a list containing required options to run the function
fit_Bliss
.
write stuff if TRUE (optional).
A numerical vector, the BIC values for the Bliss model for different K value.
# \donttest{
param_sim <- list(Q=1,n=100,p=c(50),grids_lim=list(c(0,1)))
data <- sim(param_sim,verbose=TRUE)
#> Simulation of the data.
#> Simulate functional covariate observations.
#> Choose a coefficient function.
#> Compute the outcome values.
iter = 1e2
Ks <- 1:5
res_BIC <- BIC_model_choice(Ks,iter,data)
#> K = 1
#> Initialization.
#> Determine the starting point.
#> Start the Gibbs Sampler loop.
#> K = 2
#> Initialization.
#> Determine the starting point.
#> Start the Gibbs Sampler loop.
#> K = 3
#> Initialization.
#> Determine the starting point.
#> Start the Gibbs Sampler loop.
#> K = 4
#> Initialization.
#> Determine the starting point.
#> Start the Gibbs Sampler loop.
#> K = 5
#> Initialization.
#> Determine the starting point.
#> Start the Gibbs Sampler loop.
plot(res_BIC,xlab="K",ylab="BIC")
# }