Learn R Programming

dissever (version 0.2-3)

generate_ci: Confidence intervals using bootstraping

Description

Generates confidence intervals of a dissever output using bootstraping

Usage

# S4 method for list,RasterStack
generate_ci(object, covariates, level = 0.9,
  n = 50L)

Arguments

object

object of class dissever, output from the dissever function

covariates

object of class "RasterStack", the fine-resolution stack of predictive covariates used to generate the dissever output

level

If this is a numeric value, it is used to derive confidence intervals using quantiles. If it is a function, it is used to derive the uncertainty using this function.

n

the number of bootstrap replicates used to derive the confidence intervals

Examples

Run this code
# NOT RUN {
# Load the Edgeroi dataset (see ?edgeroi)
data(edgeroi)

# Create a dissever output
diss <- dissever(
  coarse = edgeroi$carbon,
  fine = edgeroi$predictors,
  method = "lm",
  min_iter = 5, max_iter = 10,
  p = 0.05
)

# Generate the confidence intervals
# }
# NOT RUN {
ci <- generate_ci(diss, edgeroi$predictors, n = 5)

plot(ci)
# }

Run the code above in your browser using DataLab