mc_err_form {ShellChron}R Documentation

Function that propagates measurement uncertainty through model results

Description

Function to propagate combined errors on x (= Dsam) and y (= Osam) on the modeled X (= D) and Y (= d18Oc) values by means of projection of uncertainties through the modeled X-Y relationship

Usage

mc_err_form(x, x_err, y, y_err, X, Y, MC = 1000)

Arguments

x

Vector of x values of input data

x_err

Vector of uncertainties on x values

y

Vector of y values of input data

y_err

Vector of uncertainties on y values

X

Vector of modeled X values on which the uncertainty is to be projected

Y

Matrix of modeled x and Y values

MC

Number of Monte Carlo simulations to apply for error propagation Default = 1000

Details

Note: projection leads to large uncertainties on shallow parts of the X–Y curve

Value

A vector listing the standard deviations of propagated errors propagated on all X values.

Examples

# Create dummy data for input
x <-  seq(1, 40, 1)
x_err <- rep(0.1, 40)
y <- sin((2 * pi * (seq(1, 40, 1) - 8 + 30 / 4)) / 30)
y_err <- rep(0.1, 40)
X <- seq(1.5, 39.5, 1)
Y <- cbind(seq(1, 39, 1), 0.9 * sin((2 * pi * (seq(1, 39, 1) - 9 +
    25 / 4)) / 25))
# Run function
result <- mc_err_form(x, x_err, y, y_err, X, Y, 1000)

[Package ShellChron version 0.4.0 Index]