likelihood_poisson: Poisson distributed errors likelihood function

Description Usage Arguments Value

View source: R/cost_functions.R

Description

Calculates likelihood with given parameters for data. Assuming Poisson error distribution model. 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).

Usage

1
2
likelihood_poisson(params, data, param_table = NULL,
  optimisation_direction = -1, MODEL_FUNCTION, ...)

Arguments

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

Value

returns a numeric value of the total log likelihood of the give set of parameters for the data


jameshay218/mcmcJH documentation built on May 18, 2019, 11:20 a.m.