"logLik"(object, ..., warn=TRUE)
"AIC"(object, ..., k=2, takeuchi=TRUE)
"extractAIC"(fit, scale = 0, k = 2, ..., takeuchi = TRUE)
"nobs"(object, ...)
"getCall"(x, ...)
"terms"(x, ...)
"mppm"
.
TRUE
, a warning is given when the
pseudolikelihood is returned instead of the likelihood.
takeuchi=TRUE
) or the
number of fitted parameters (takeuchi=FALSE
)
in calculating AIC.
logLik
,
AIC
,
extractAIC
,
terms
and
getCall
for the class "mppm"
. An object of class "mppm"
represents a fitted
Poisson or Gibbs point process model fitted to several point patterns.
It is obtained from the model-fitting function mppm
.
The method logLik.mppm
extracts the
maximised value of the log likelihood for the fitted model
(as approximated by quadrature using the Berman-Turner approximation).
If object
is not a Poisson process, the maximised log
pseudolikelihood is returned, with a warning.
The Akaike Information Criterion AIC for a fitted model is defined as
$$
AIC = -2 \log(L) + k \times \mbox{penalty}
$$
where $L$ is the maximised likelihood of the fitted model,
and $penalty$ is a penalty for model complexity,
usually equal to the effective degrees of freedom of the model.
The method extractAIC.mppm
returns the analogous quantity
$AIC*$ in which $L$ is replaced by $L*$,
the quadrature approximation
to the likelihood (if fit
is a Poisson model)
or the pseudolikelihood (if fit
is a Gibbs model).
The $penalty$ term is calculated
as follows. If takeuchi=FALSE
then $penalty$ is
the number of fitted parameters. If takeuchi=TRUE
then
$penalty = trace(J H^(-1))$
where $J$ and $H$ are the estimated variance and hessian,
respectively, of the composite score.
These two choices are equivalent for a Poisson process.
The method nobs.mppm
returns the total number of points
in the original data point patterns to which the model was fitted.
The method getCall.mppm
extracts the original call to
mppm
which caused the model to be fitted.
The method terms.mppm
extracts the covariate terms in the
model formula as a terms
object. Note that these terms do not
include the interaction component of the model.
The R function step
uses these methods.
mppm
fit <- mppm(Bugs ~ x, hyperframe(Bugs=waterstriders))
logLik(fit)
AIC(fit)
nobs(fit)
getCall(fit)
Run the code above in your browser using DataLab