Learn R Programming

lgcp (version 1.8)

cov.interp.fft: cov.interp.fft function

Description

A function to interpolate covariate values onto the fft grid, ready for analysis

Usage

cov.interp.fft(
  formula,
  W,
  regionalcovariates = NULL,
  pixelcovariates = NULL,
  mcens,
  ncens,
  cellInside,
  overl = NULL
)

Arguments

formula

an object of class formula (or one that can be coerced to that class) starting with X ~ (eg X~var1+var2 *NOT for example* Y~var1+var2): a symbolic description of the model to be fitted.

W

an owin observation window

regionalcovariates

an optional SpatialPolygonsDataFrame

pixelcovariates

an optional SpatialPixelsDataFrame

mcens

x-coordinates of output grid centroids (not fft grid centroids ie *not* the extended grid)

ncens

y-coordinates of output grid centroids (not fft grid centroids ie *not* the extended grid)

cellInside

a 0-1 matrix indicating which computational cells are inside the observation window

overl

an overlay of the computational grid onto the SpatialPolygonsDataFrame or SpatialPixelsDataFrame.

Value

The interpolated design matrix, ready for analysis