estimate.correlation.range: Estimates the effective correlation range of fields from a...

View source: R/estimate.correlation.range.R

estimate.correlation.rangeR Documentation

Estimates the effective correlation range of fields from a scampr model using the estimated covariance function via spatstat.core::spatcov

Description

Estimates the effective correlation range of fields from a scampr model using the estimated covariance function via spatstat.core::spatcov

Usage

estimate.correlation.range(
  object,
  domain.data,
  cutoff.correlation = 0.1,
  field = c("latent", "mean", "bias"),
  plotting = FALSE
)

Arguments

object

a scampr model object

domain.data

a data frame describing describing the domain via point locations on a regular grid, as well as any predictors used in the provided model.

cutoff.correlation

a numeric describing the correlation at which the effective range is reached. Default is 0.1

field

a character string, one of 'latent', 'mean' or 'bias'. Describes the field (component) for which the range is to be estimated. 'mean' refers to the fitted intensity.

plotting

a logical indicating whether or not to plot the field and estimated spatial covariance function.

Value

a numeric describing the estimated range (with a numeric attribute describing the correlation at this range)

Examples

#' # Get the gorilla nesting data
dat <- gorillas

# Standardise the elevation covariate
dat$elev.std <- scale(dat$elevation)

# Fit a scampr model to the point pattern
m <- scampr(pres ~ elev.std, data = dat, model.type = "PO")

# Use the gorillas quadrature as the domain grid
domain <- gorillas[gorillas$pres == 0, ]
estimate.correlation.range(m, domain, field = "mean", plotting = T)

ElliotDovers/scampr documentation built on March 17, 2024, 3:27 p.m.