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-valiation test and training datasets of the observed cases are generated by k-fold sampling without replacement.

1 2 3 |

`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 |

`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 |

`tol` |
Tolerance for convergence |

`maxIter` |
Maximum number of iterations for convergence |

`fact` |
Aggregation factor for offsets prior to smoothing |

`randomSeed` |
Seed for random number generator |

`verbose` |
Verbose output |

`path` |
Folder for storing rasters |

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 a raster of the risk estimation of the bandwidth with the lowest cross-validiation score.

localEM documentation built on July 8, 2017, 3:01 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.