Description Usage Arguments Details Value Examples
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
1 | mc_err_form(x, x_err, y, y_err, X, Y, MC = 1000)
|
x |
Vector of |
x_err |
Vector of uncertainties on |
y |
Vector of |
y_err |
Vector of uncertainties on |
X |
Vector of modeled |
Y |
Matrix of modeled x and |
MC |
Number of Monte Carlo simulations to apply for error propagation Default = 1000 |
Note: projection leads to large uncertainties on shallow parts of the
X–Y
curve
A vector listing the standard deviations of propagated errors
propagated on all X
values.
1 2 3 4 5 6 7 8 9 10 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.