Runs a parameteric bootstrapping likelihood ratio test on two DAISIE models
Source:R/bootstrap_lr.R
bootstrap_lr.Rd
Runs a parameteric bootstrapping likelihood ratio test on two DAISIE models
Usage
bootstrap_lr(
daisie_data,
data_name,
model_1,
model_2,
array_index,
cond,
methode = "lsodes",
optimmethod = "subplex",
results_dir = NULL,
test = FALSE
)
Arguments
- daisie_data
A list, conforming to the
DAISIE
object format. Usually preprocessed byDAISIE::DAISIE_dataprep()
, see it's documentation for details. Otherwise it may be generated via simulations, usingDAISIE::DAISIE_sim_cr()
and friends.- data_name
String. Will be used for the name of the created output folder.
- model_1
A string with model that should run. For a list of options see documentation for
model
parameter inrun_daisie_ml()
.- model_2
A string with model that should run. For a list of options see documentation for
model
parameter inrun_daisie_ml()
.- array_index
A single numeric with the array index. It is used for naming the output file.
- cond
An integer specifying conditioning, as described in
DAISIE::DAISIE_ML_CS()
.- methode
Method of the ODE-solver. Supported Boost
ODEINT
solvers (steppers) are:"odeint::runge_kutta_cash_karp54"
"odeint::runge_kutta_fehlberg78"
"odeint::runge_kutta_dopri5"
"odeint::bulirsch_stoer"
withoutodeint::
-prefix,\link{deSolve}{ode}()
method is assumed. The default method overall is"lsodes"
for\link{DAISIE_ML_CS}()
and"ode45"
from\link[deSolve]{ode}()
for\link{DAISIE_ML_IW}()
.- optimmethod
Method used in likelihood optimization. Default is
subplex
(see\link[subplex]{subplex}()
for full details). Alternative is"simplex"
which was the method in previous versions.- results_dir
A string with the path to the directory where results are to be stored or can be found. For example, if the data in question is (to be) stored in
folder_with_res/$data_name
, thenresults_dir
should be"folder_with_res"
. Defaults toNULL
, which indicates the default directories are to be used. Default directories are: *$HOME/results/$data_name
if on the cluster *getwd()/results/$data_name
if called from another environment Ifis.na(results_dir)
, then the object is returned to the R session and not saved to file.- test
A boolean, defaults to
FALSE
. Set toTRUE
for testing purposes, to fix the seed.
Value
Nothing. Writes bootstrapping results to a .rds
file. This
file is stored in file_path
. The directory in of file_path
is created
if it doesn't exist.
Examples
if (FALSE) {
data(Galapagos_datalist, package = "DAISIE")
bootstrap_lr(
daisie_data = Galapagos_datalist,
model_1 = "cr_dd",
model_2 = "cr_di",
array_index = 1,
cond = 1,
)
}