predUncertain: A function to develop spatial map of modelling uncertainty...

View source: R/predUncertain.R

predUncertainR Documentation

A function to develop spatial map of modelling uncertainty using the bootstrap approach

Description

This functions uses bootstrap approach to estimate spatial maps of modelling prediction interval width and standard deviation

Usage

predUncertain(indata,fgrid, k, z, model="rf")

Arguments

indata

one column input spatial dataframe containing the target soil variable or its transformation

fgrid

Input grid or raster stack containing predictors set for the target soil variable

k

Set limit for number of realizations/simulations for bootstrap algorithm

z

Confidence interval level in percent (for example 95)

model

The model for predicting target soil variable using the predictors (for example linear)

Details

One-variable input dataframe is prefered or at least the first column should have the target soil variable to predict. It should not contain NAs. The number of realizations k need not be too high because the software multiplies it exponentially and may slow down the computing process if set to a high value. For example k=5 will results into more than 40 realizations created

Value

a two-layer raster stack map of prediction width and standard deviation

Note

The input dataframe and predictors need to have similar coordinate reference system (CRS). In addition, the input dataframe should not have missing entrie (NAs)

Author(s)

Christian Thine Omuto

References

Efron B. 1992. Jackknife-after-bootstrap standard errors and influence functions. Journal of the Royal Statistical Society. Series B (Methodological), 83–127.

See Also

regmodelSuit, imageIndices,predAccuracy

Examples

library(raster)
library(caret)
soil1=soil[,c("OC")]
predictere=suitabinput[c("depthcodes","rain","texture","dem")]

pred_uncert=predUncertain(soil1,predictere,3,90,"rf")
plot(pred_uncert)


soilassessment documentation built on July 9, 2023, 7:40 p.m.