logLik.slrm: Loglikelihood of Spatial Logistic Regression

View source: R/slrm.R

logLik.slrmR Documentation

Loglikelihood of Spatial Logistic Regression

Description

Computes the (maximised) loglikelihood of a fitted Spatial Logistic Regression model.

Usage

  ## S3 method for class 'slrm'
logLik(object, ..., adjust = TRUE)

Arguments

object

a fitted spatial logistic regression model. An object of class "slrm".

...

Ignored.

adjust

Logical value indicating whether to adjust the loglikelihood of the model to make it comparable with a point process likelihood. See Details.

Details

This is a method for logLik for fitted spatial logistic regression models (objects of class "slrm", usually obtained from the function slrm). It computes the log-likelihood of a fitted spatial logistic regression model.

If adjust=FALSE, the loglikelihood is computed using the standard formula for the loglikelihood of a logistic regression model for a finite set of (pixel) observations.

If adjust=TRUE then the loglikelihood is adjusted so that it is approximately comparable with the likelihood of a point process in continuous space, by subtracting the value n * log(a) where n is the number of points in the original point pattern dataset, and a is the area of one pixel.

Value

A numerical value.

Author(s)

\adrian

adrian@maths.uwa.edu.au

and \rolf

See Also

slrm

Examples

  X <- rpoispp(42)
  fit <- slrm(X ~ x+y)
  logLik(fit)
  logLik(fit, adjust=FALSE)

spatstat.core documentation built on May 18, 2022, 9:05 a.m.