getOptCellwidth: getOptCellwidth function

View source: R/spatgrid.R

getOptCellwidthR Documentation

getOptCellwidth function

Description

A function to compute an optimal cellwidth close to an initial suggestion. This maximises the efficiency of the MCMC algorithm when in the control argument of the function survspat, the option gridded is set to TRUE

Usage

getOptCellwidth(dat, cellwidth, ext = 2, plot = TRUE, boundingbox = NULL)

Arguments

dat

any spatial data object whose bounding box can be computed using the function bbox.

cellwidth

an initial suggested cellwidth

ext

the extension parameter for the FFT transform, set to 2 by default

plot

whether to plot the grid and data to illustrate the optimal grid

boundingbox

optional bounding box over which to construct computational grid, supplied as an object on which the function 'bbox' returns the bounding box

Value

the optimum cell width


spatsurv documentation built on Oct. 19, 2023, 9:07 a.m.