predict.ppmnet: Make predictions from a 'ppmnet' object

Description Usage Arguments Value Examples

View source: R/predict.R

Description

Makes predictions from a regularized spatial point process model fit via penalized composite likelihood.

Usage

1
2
3
## S3 method for class 'ppmnet'
predict(object, data, window = NULL, eps = NULL,
  dimyx = NULL, s = NULL, type = c("trend", "intensity", "cif"), ...)

Arguments

object

A fitted ppmnet object.

data

A list of pixel images (of class imlist) containing the spatial covariates used to fit the model.

window

Optional. An observation window (of class owin) defining the region within which predictions are to be made. Default is the window of the original data used to fit the model.

eps

Optional. The height and width of pixels in the prediction image(s). A numeric value or numeric vector of length 2 specifying pixel dimensions in the x and y directions. Incompatible with dimyx.

dimyx

Optional. The resolution of the prediction image(s). A numeric value or numeric vector of length 2 specifying the number of pixels in the y and x directions. Incompatible with eps.

s

Value(s) of the penalty tuning parameter at which predictions are to be made. Default is the entire sequence used to fit the regularization path.

type

Type of prediction required. Either "trend" for the spatial trend, "intensity" for the intensity (Poisson models only), or "cif" for the conditional intensity.

...

Additional arguments passed to predict.glmnet.

Value

A list of pixel images containing predictions, or, if s is of length 1, a single pixel image.

Examples

1
2
3
4
5
6
7
8
9
# Predicted intensities
Qp <- quadscheme(Xp)
fitp <- ppmnet(Qp, exdata)
predict(fitp, exdata)

# Predicted conditional intensities
Qs <- quadscheme(Xs)
fits <- ppmnet(Qs, exdata, Strauss(5), nlambda = 20)
predict(fits, exdata, type = "cif")

jeffdaniel/ppmnet documentation built on Aug. 14, 2019, 6:31 a.m.