View source: R/predUncertain.R
predUncertain | R Documentation |
This functions uses bootstrap approach to estimate spatial maps of modelling prediction interval width and standard deviation
predUncertain(indata,fgrid, k, z, model="rf")
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) |
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
a two-layer raster stack map of prediction width and standard deviation
The input dataframe and predictors need to have similar coordinate reference system (CRS). In addition, the input dataframe should not have missing entrie (NAs)
Christian Thine Omuto
Efron B. 1992. Jackknife-after-bootstrap standard errors and influence functions. Journal of the Royal Statistical Society. Series B (Methodological), 83–127.
regmodelSuit
, imageIndices
,predAccuracy
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.