logLik | R Documentation |

Extract the estimated log likelihood (or related quantity) from a fitted model.

```
logLik(object, ...)
## S4 method for signature 'listie'
logLik(object, ...)
## S4 method for signature 'pfilterd_pomp'
logLik(object)
## S4 method for signature 'wpfilterd_pomp'
logLik(object)
## S4 method for signature 'probed_pomp'
logLik(object)
## S4 method for signature 'kalmand_pomp'
logLik(object)
## S4 method for signature 'pmcmcd_pomp'
logLik(object)
## S4 method for signature 'bsmcd_pomp'
logLik(object)
## S4 method for signature 'objfun'
logLik(object)
## S4 method for signature 'spect_match_objfun'
logLik(object)
## S4 method for signature 'nlf_objfun'
logLik(object, ...)
```

`object` |
fitted model object |

`...` |
ignored |

numerical value of the log likelihood.
Note that some methods compute not the log likelihood itself but instead a related quantity.
To keep the code simple, the `logLik`

function is nevertheless used to extract this quantity.

When `object`

is of ‘pfilterd_pomp’ class (i.e., the result of a `wpfilter`

computation), `logLik`

retrieves the estimated log likelihood.

When `object`

is of ‘wpfilterd_pomp’ class (i.e., the result of a `wpfilter`

computation), `logLik`

retrieves the estimated log likelihood.

When `object`

is of ‘probed_pomp’ class (i.e., the result of a `probe`

computation), `logLik`

retrieves the “synthetic likelihood”.

When `object`

is of ‘kalmand_pomp’ class (i.e., the result of an `eakf`

or `enkf`

computation), `logLik`

retrieves the estimated log likelihood.

When `object`

is of ‘pmcmcd_pomp’ class (i.e., the result of a `pmcmc`

computation), `logLik`

retrieves the estimated log likelihood as of the last particle filter operation.

When `object`

is of ‘bsmcd_pomp’ class (i.e., the result of a `bsmc2`

computation), `logLik`

retrieves the “log evidence”.

When `object`

is of ‘spect_match_objfun’ class (i.e., an objective function constructed by `spect_objfun`

), `logLik`

retrieves minus the spectrum mismatch.

When `object`

is an NLF objective function, i.e., the result of a call to `nlf_objfun`

,
`logLik`

retrieves the “quasi log likelihood”.

Other extraction methods:
`coef()`

,
`cond_logLik()`

,
`covmat()`

,
`eff_sample_size()`

,
`filter_mean()`

,
`filter_traj()`

,
`forecast()`

,
`obs()`

,
`pred_mean()`

,
`pred_var()`

,
`saved_states()`

,
`spy()`

,
`states()`

,
`summary()`

,
`timezero()`

,
`time()`

,
`traces()`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.