Description Usage Arguments Details Value
The lemXv
function computes the likelihood cross-validation scores for the observed data with the input bandwidths used for the smoothing matrix. The cross-validation test and training datasets of the observed cases are generated by k-fold sampling without replacement.
1 2 3 4 |
cases |
Spatial polygons with case data |
population |
Spatial polygons with population data |
cellsCoarse |
Minimum resolution for rasterization of case data for numerical accuracy of smoothing matrix |
cellsFine |
Minimum resolution for rasterization of population data for numerical integration of smoothing matrix |
bw |
Vector of bandwidths |
fact |
Aggregation factor prior to 'final step' smoothing (set to zero to skip final step) |
xv |
Number of cross-validation datasets |
lemObjects |
List of arrays for the smoothing matrix, and raster stacks for the partition and smoothed offsets |
ncores |
Number of cores/threads for parallel processing |
iterations |
List of convergence tolerance, number of iterations, and use of gpuR package for running local-EM recursions |
randomSeed |
Seed for random number generator |
path |
Folder for storing rasters |
filename |
Filename (must have .grd extension) of the risk estimation |
verbose |
Verbose output |
After using the lemXv
function, a raster stack containing the IDs for the partitions is created by overlaying the spatial polygons of the case and population data. The smoothed offsets and smoothing matrix are computed for the specified bandwidths of each cross-validation set.
The lemXv
function returns a data frame of specified bandwidths and their cross-validation scores, and if specified, a raster of the risk estimation of the bandwidth with the lowest cross-validation score.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.