Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/sample_function_single_mod.R
Generate a posterior sample using a single local search maximization and sampling.
1 | sample_function_single_mod(knobj)
|
knobj |
A knowledge list. See |
The parameters governing the local search and sampling behaviour are defined in the global_parameters
slot of the knobjs
argument. The function consists in using the BFGS_special
function to find an initialization for the Metropolis Hasting algorithm implented by generate_sample
. This is done a single time.
A matrix which rows represent a named numeric vector of parameters
Edouard Pauwels
sample_function
, BFGS_special
, generate_sample
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data(experiment_list1)
data(observables)
## Generate the knowledge object with correct parameter value
knobj <- generate_our_knowledge(transform_params)
## Initialize with some data
knobj$datas[[1]] <- list(
manip = experiment_list1$nothing,
data = add_noise(
simulate_experiment(knobj$global_parameters$true_params_T, knobj, experiment_list1$nothing)[
knobj$global_parameters$tspan %in% observables[["mrnaLow"]]$reso,
observables[["mrnaLow"]]$obs
]
)
)
## Decrease parameter values for the example
knobj$global_parameters$max_it <- 2
knobj$global_parameters$sample_burn_in <- 5
knobj$global_parameters$sample_to_keep1 <- 10
knobj$global_parameters$final_sample <- 5
knobj$global_parameters$final_sample_est <- 5
thetas <- sample_function_single_mod(knobj)
thetas
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.