Learn R Programming

pauwels2014 (version 1.0)

eval_kn_log_like: Evaluates the likelihood of a parameter value

Description

This evaluates the likelihood of a parameter value by comparing corresponding kinetics to a given time course matrix.

Usage

eval_kn_log_like(theta, initial_conditions, data, knobj, fail_incoming = F, simu = NULL, fit = F)

Arguments

theta
A parameter named numeric vector.
initial_conditions
Initial conditions named numeric vector.
data
A time course matrix
knobj
A knowledge list. See knobjs
fail_incoming
A boolean indicating wether an error message is given by the ode solver.
simu
The simulated time course matrix corresponding to the parameter theta. If it is not provided, it will be computed by a call to simulate_experiment_no_transform.
fit
A parameter to be passed to the likelihood function. It indicates wether further prior information about the smoothness of the dynamical time course should be considered. This is used to guide local search posterior maximization methods.

Value

A numerical value if fail_incoming == FALSE. A list containing a res numerical slot and a fail boolean slot representing weither the ode solver failed or not.

Details

The comparison is made based on the user defined log_likelihood function.

See Also

log_likelihood, knobjs, simulate_experiment_no_transform

Examples

Run this code
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
  ]
 )
)

eval_kn_log_like(
 knobj$global_parameters$true_params, 
 knobj$global_parameters$initial_conditions, 
 knobj$datas[[1]]$data, knobj )

Run the code above in your browser using DataLab