Learn R Programming

soilassessment (version 0.3.0)

predUncertain: 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")

Value

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

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)

Author

Christian Thine Omuto

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

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

Run this code
library(raster)
library(caret)
soil1=soil[,c("OC")]
predictere=suitabinput[c("depthcodes","rain","texture","dem")]
# \donttest{
pred_uncert=predUncertain(soil1,predictere,3,90,"rf")
plot(pred_uncert)
# }

Run the code above in your browser using DataLab