View source: R/estimate.correlation.range.R
estimate.correlation.range | R Documentation |
spatstat.core::spatcov
Estimates the effective correlation range of fields from a scampr model using the estimated covariance function via spatstat.core::spatcov
estimate.correlation.range(
object,
domain.data,
cutoff.correlation = 0.1,
field = c("latent", "mean", "bias"),
plotting = FALSE
)
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. |
a numeric describing the estimated range (with a numeric attribute describing the correlation at this range)
#' # 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.