Learn R Programming

spatstat.core (version 2.3-1)

vcov.mppm: Calculate Variance-Covariance Matrix for Fitted Multiple Point Process Model

Description

Given a fitted multiple point process model, calculate the variance-covariance matrix of the parameter estimates.

Usage

# S3 method for mppm
vcov(object, ..., what="vcov", err="fatal")

Arguments

object

A multiple point process model (object of class "mppm").

Arguments recognised by vcov.ppm.

what

Character string indicating which quantity should be calculated. Options include "vcov" for the variance-covariance matrix, "corr" for the correlation matrix, and "fisher" for the Fisher information matrix.

err

Character string indicating what action to take if an error occurs. Either "fatal", "warn" or "null".

Value

A numeric matrix (or NA or NULL).

Error messages

An error message that reports system is computationally singular indicates that the determinant of the Fisher information matrix of one of the models was either too large or too small for reliable numerical calculation. See vcov.ppm for suggestions on how to handle this.

Details

This is a method for the generic function vcov.

The argument object should be a fitted multiple point process model (object of class "mppm") generated by mppm.

The variance-covariance matrix of the parameter estimates is computed using asymptotic theory for maximum likelihood (for Poisson processes) or estimating equations (for other Gibbs models).

If what="vcov" (the default), the variance-covariance matrix is returned. If what="corr", the variance-covariance matrix is normalised to yield a correlation matrix, and this is returned. If what="fisher", the Fisher information matrix is returned instead.

In all three cases, the rows and columns of the matrix correspond to the parameters (coefficients) in the same order as in coef{model}.

If errors or numerical problems occur, the argument err determines what will happen. If err="fatal" an error will occur. If err="warn" a warning will be issued and NA will be returned. If err="null", no warning is issued, but NULL is returned.

References

Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. London: Chapman and Hall/CRC Press.

See Also

vcov, vcov.ppm, mppm

Examples

Run this code
# NOT RUN {
   fit <- mppm(Wat ~x, data=hyperframe(Wat=waterstriders))
   vcov(fit)
# }

Run the code above in your browser using DataLab