Description Usage Arguments Value Examples
View source: R/cost_functions.R
Calculates the likelihood of a given vector of parameters for the provided data. Assumes error is normally distributed where standard deviation is the final argument of the parameter vector. Restrictions on param_table: must be a data frame or matrix with headers: value, lower_bound, upper_bound, use_logistic and use_log. Note that use_logistic and use_log should not both be TRUE. Optimisation direction should be -1 or 1 depending on if we are maximising negative or positive log likelihood. This should be -1 for optim, and +1 for MCMC (-1 for minimisation and +1 for maximisation).
1 2 | likelihood_norm(params, data, param_table = NULL,
optimisation_direction = -1, MODEL_FUNCTION, ...)
|
params |
vector of parameters (ie. theta) for which likelihood is to be evaluated |
data |
matrix or data frame of the data under evaluation. The first column should be a set of time points, whereas the second column is the values at these times |
param_table |
optional table to accompany the parameters, specifying options such as log or logistic transformation |
optimisation_direction |
numeric value taking +1 or -1 to specify whether returned value is a negative or positive log likelihood |
MODEL_FUNCTION |
a function pointer for the model function that will be used to evaluated the model with the given set of parameters |
... |
any additional arguments that are required by the model function |
returns a numeric value of the total log likelihood of the give set of parameters for the data
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.