Description Usage Arguments Details Value Note Author(s) References See Also Examples

Calculate the log likelihood of a fully saturated time varying CJS
model. Use to convert the relative deviance output by `F.cjs.estim`

to
actual deviance.

1 | ```
F.sat.lik(ch)
``` |

`ch` |
A capture history matrix consisting of 0's, 1's, and 2's. |

The number reported as `deviance`

by `F.cjs.estim`

is relative
deviance, calculated as -2*log(likelihood). IF THERE ARE NO INDIVIDUAL-VARYING
COVARIATES in the model, it is possible to compute the theoretical log-likelihood
for a set of data assuming perfect prediction. This is the saturated log-likelihood.
The actual deviance of a model is the deviance of the model relative to this
theoretical maximum, computed as -2*((saturated log-likelihood) -
2*(model log-likelihood)).

In the parameterization of `F.cjs.estim`

, all covariates are potentially individual and
time varying, and in this case the saturated log-likelihood is unknown. Consequently,
the saturated likelihood is not often needed in MRA. This routine was included
as a utility function because the saturated likelihood is handy in some cases, including
parametric bootstrapping to estimate C-hat.

Assuming `cjs.fit`

is an estimated CJS model with time varying
covariates only fit to histories in `cjs.hists`

, compute deviance as

`-F.sat.lik(cjs.hists) - 2*cjs.fit\$loglik`

=
`cjs.fit\$deviance - F.sat.lik(cjs.hists)`

A scalar equal to the value of the saturated CJS log-likelihood. The saturated log-likelihood is the theoretical best predictive model possible, and actual deviance is calculated relative to this. See Examples.

CAUTION: This routine works for time varying models only. If
individual-varying or individual-and-time-varying covariates are fitted
in the model,
the routine cannot sense it and will run but yield an incorrect answer.
Use relative deviance reported by `F.cjs.estim`

in this case.

Also, this routine will not run if animals have been removed (censored). I.e., the
capture history matrix cannot have any 2's in it. Use relative deviance reported
by `F.cjs.estim`

when animals have been removed.

Eric V. Regehr (USGS, [email protected]) and Trent McDonald (WEST Inc., [email protected])

Look up "saturated model" in the program MARK help file for the equations implemented by this function.

1 2 3 4 5 6 7 | ```
data(dipper.histories)
xy <- F.cjs.covars( nrow(dipper.histories), ncol(dipper.histories) )
for(j in 1:ncol(dipper.histories)){ assign(paste("x",j,sep=""), xy$x[,,j]) }
dipper.cjs <- F.cjs.estim( ~x2+x3+x4+x5+x6, ~x1+x2+x3+x4+x5, dipper.histories )
deviance <- -F.sat.lik( dipper.histories ) - 2*dipper.cjs$loglik
``` |

mra documentation built on May 1, 2019, 6:50 p.m.

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.