sloopoint.fun: A function to plot the left-out points during the spatial...

View source: R/sloopoint.fun.R

sloopoint.funR Documentation

A function to plot the left-out points during the spatial leave-one-out cross-validation in R using INLA.

Description

This function plots the left-out point(s) of a spatial leave-one-out cross-validation (SLOO-CV) of one or several models running on INLA.

Usage

sloopoint.fun(points = points, test = test, rad = rad)

Arguments

points

= cbind of longitude and latitude of the observed points (full sample)

test

= cbind of longitude and latitude of the test point(s)

rad

= Numeric value giving the radius for the spatial buffer around left-out point's location

Examples

## Not run: 
 # sloopoint function
 dataframe<-data.frame(long=runif(100, -40.0, 40.0),lat=runif(100, -40.0, 40.0))
 test<-dataframe[1:10,]
 rad = 1
 
 # run the function
 sloopoint.fun(points = cbind(dataframe$long, dataframe$lat), test = cbind(test$long, test$lat), 
 rad = rad)
 
## End(Not run)

timcdlucas/INLAutils documentation built on Nov. 29, 2022, 5:41 a.m.