Learn R Programming

spatstat (version 1.55-0)

pseudoR2: Calculate Pseudo-R-Squared for Point Process Model

Description

Given a fitted point process model, calculate the pseudo-R-squared value, which measures the fraction of variation in the data that is explained by the model.

Usage

pseudoR2(object, …)

# S3 method for ppm pseudoR2(object, …)

# S3 method for lppm pseudoR2(object, …)

Arguments

object

Fitted point process model. An object of class "ppm" or "lppm".

Additional arguments passed to deviance.ppm or deviance.lppm.

Value

A single numeric value.

Details

The function pseudoR2 is generic, with methods for fitted point process models of class "ppm" and "lppm".

This function computes McFadden's pseudo-Rsquared $$ R^2 = 1 - \frac{D}{D_0} $$ where \(D\) is the deviance of the fitted model object, and \(D_0\) is the deviance of the null model (obtained by refitting object using the trend formula ~1). Deviance is defined as twice the negative log-likelihood or log-pseudolikelihood.

See Also

deviance.ppm, deviance.lppm.

Examples

Run this code
# NOT RUN {
  fit <- ppm(swedishpines ~ x+y)
  pseudoR2(fit)
# }

Run the code above in your browser using DataLab