Learn R Programming

amber (version 1.0.3)

intFun.rel.error: Relative error used for binned data

Description

This function computes the relative error for binned data used for assessing functional relationships: \($\varepsilon_{func}^u=\sqrt{\frac{\int(f_{mod}(u)-f_{ref}(u))^2du}{\int f_{ref}(u)^2du}}$\)

where \(f_{mod}(u)\) and \(f_{ref}(u)\) are the binned time means of the model and reference data, respectively.

Usage

intFun.rel.error(mod, ref)

Arguments

mod

An R object (binned time means of model output)

ref

An R object (binned time means of reference data)

Value

An R object

Examples

Run this code
# NOT RUN {
# make some data
mod <- runif(100,0,10)
ref <- runif(100,0,10)
# compute relative error
r <- intFun.rel.error(mod,ref)

# }

Run the code above in your browser using DataLab