Produces a pca plot with spatial variation in localisation probabilities

spatial2D(
  object,
  dims = c(1, 2),
  cov.function = fields::wendland.cov,
  theta = 1,
  derivative = 2,
  k = 1,
  breaks = c(0.99, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7),
  aspect = 0.5
)

Arguments

object

A valid object of class MSnset with mcmc prediction results from tagmMCMCpredict

dims

The PCA dimension in which to project he data, default is c(1,2)

cov.function

The covariance function used default is wendland.cov. See fields package.

theta

A hyperparameter to the covariance function. See fields package. Default is 1.

derivative

The number of derivative of the wendland kernel. See fields package. Default is 2.

k

A hyperparamter to the covariance function. See fields package. Default is 1.

breaks

Probability values at which to draw the contour bands. Default is c(0.99, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7)

aspect

A argument to change the plotting aspect of the PCA

Value

Used for side effect of producing plot. Invisibily returns an ggplot object that can be further manipulated

Author

Oliver M. Crook <omc25@cam.ac.uk>

Examples

if (FALSE) {
library("pRolocdata")
data("tan2009r1")

tanres <- tagmMcmcTrain(object = tan2009r1)
tanres <- tagmMcmcProcess(tanres)
tan2009r1 <- tagmMcmcPredict(object = tan2009r1, params = tanres, probJoint = TRUE)
spatial2D(object = tan2009r1)
}