Mll

object Mll

Functions associated with particle filtering of Markov process models against time series data and the computation of marginal model likelihoods.

class Object
trait Matchable
class Any

Value members

Concrete methods

def bpf[S, O](x0: Vector[S], t0: Time, data: Ts[O], dataLik: (S, O) => LogLik, stepFun: (S, Time, Time) => S)(implicit evidence$1: State[S]): (LogLik, Time, Vector[S])

A simple bootstrap particle filter with multinomial resampling. Note that it supports time series of observations on irregular time grids. Note that this is the function which does most of the work for pfMll.

A simple bootstrap particle filter with multinomial resampling. Note that it supports time series of observations on irregular time grids. Note that this is the function which does most of the work for pfMll.

Value Params
data

The observed data in the form of a time series

dataLik

The log-likelihood of the observation model

stepFun

The transition kernel of the underlying process

t0

The time corresponding to the prior sample

x0

A sample from the prior on the state at time t0. The size of the sample determines the number of particles used in the particle filter.

Returns

A triple: the first element is the log of an unbiased estimate of the marginal likelihood of the model, the second is just the final time point, and the third is a sample from the posterior distribution of the final time point.

def pfMll[P, S, O](simX0: P => Vector[S], t0: Time, stepFun: P => (S, Time, Time) => S, dataLik: P => (S, O) => LogLik, data: Ts[O])(implicit evidence$2: State[S]): P => LogLik

A function for evaluating marginal log-likelihoods of parametrised models. It basically just threads a parameter value through the arguments required for bpf.

A function for evaluating marginal log-likelihoods of parametrised models. It basically just threads a parameter value through the arguments required for bpf.

Value Params
data

The observed data in the form of a time series

dataLik

A function, which when provided with a parameter value, will return the log-likelihood of the observation model

simX0

A function which when provided with a parameter value will return a sample from the prior on the intial state of a Markov process model. The size of the sample will determine the number of particles used in the particle filter.

stepFun

A function, which when provided with a parameter value, will return the transition kernel of a Markov process.

t0

The intial time corresponding to the prior sample

def sample(n: Int, prob: DenseVector[Double]): Vector[Int]