coef.mppm | R Documentation |
Given a point process model fitted to a list of point patterns,
extract the coefficients of the fitted model.
A method for coef
.
## S3 method for class 'mppm' coef(object, ...)
object |
The fitted point process model (an object of class |
... |
Ignored. |
This function is a method for the generic function coef
.
The argument object
must be a fitted point process model
(object of class "mppm"
) produced by the
fitting algorithm mppm
). This represents a
point process model that has been fitted
to a list of several point pattern datasets. See mppm
for information.
This function extracts the vector of coefficients of the fitted model. This is the estimate of the parameter vector θ such that the conditional intensity of the model is of the form
λ(u,x) = \exp(θ . S(u,x))
where S(u,x) is a (vector-valued) statistic.
For example, if the model object
is the uniform Poisson process,
then coef(object)
will yield a single value
(named "(Intercept)"
) which is the logarithm of the
fitted intensity of the Poisson process.
If the fitted model includes random effects (i.e. if the argument
random
was specified in the call to mppm
),
then the fitted coefficients are different for each point pattern
in the original data, so coef(object)
is a data frame
with one row for each point pattern, and one column for each
parameter. Use fixef.mppm
to extract the vector of fixed effect
coefficients, and ranef.mppm
to extract the random
effect coefficients at each level.
Use print.mppm
to print a more useful
description of the fitted model.
Either a vector containing the fitted coefficients, or a data frame containing the fitted coefficients for each point pattern.
Adrian Baddeley, Ida-Maria Sintorn and Leanne Bischoff. Implemented in spatstat by \spatstatAuthors.
Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. London: Chapman and Hall/CRC Press.
fixef.mppm
and ranef.mppm
for the fixed and random effect coefficients in a model that includes
random effects.
print.mppm
,
mppm
H <- hyperframe(X=waterstriders) fit.Poisson <- mppm(X ~ 1, H) coef(fit.Poisson) # The single entry "(Intercept)" # is the log of the fitted intensity of the Poisson process fit.Strauss <- mppm(X~1, H, Strauss(7)) coef(fit.Strauss) # The two entries "(Intercept)" and "Interaction" # are respectively log(beta) and log(gamma) # in the usual notation for Strauss(beta, gamma, r) # Tweak data to exaggerate differences H$X[[1]] <- rthin(H$X[[1]], 0.3) # Model with random effects fitran <- mppm(X ~ 1, H, random=~1|id) coef(fitran)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.