Learn R Programming

panelPomp (version 1.7.0.0)

unitLogLik: Extract log likelihood of units of panel models

Description

unitLogLik() is a generic function that extracts the log likelihood for each unit of panel objects returned by panel modeling functions. While the numeric value with the log likelihood for the entire panel is useful and possible via S4 methods logLik(), the contributions to it by panel units can be implemented via unitLogLik().

Usage

unitLogLik(object, ...)

Value

Log likelihood extracted for each unit of the panel model object.

When given objects of class pfilterd.ppomp, unitLoglik() returns a numeric vector.

Arguments

object

an object for which log likelihood values for units can be extracted.

...

additional arguments.

Author

Carles Bretó

Details

This is a generic function: methods can be defined for it.

See Also

pfilter

Examples

Run this code
# filter, which generates log likelihoods
pfrw <- pfilter(panelRandomWalk(),Np=10)
# extract log likelihood for each panel unit
unitLogLik(pfrw)

Run the code above in your browser using DataLab