Skip to contents

Estimate the error on the difference between two time-slices

Usage

ErrDiff2TimeSlices(pes, tau_1, tau_2, delta_ts)

Arguments

pes

Object of class proxy.error.spec, e.g. output from ProxyErrorSpectrum

tau_1

Length of first timeslice

tau_2

Length of second timeslice

delta_ts

Time interval between centres of the two timeslices

Value

a dataframe

Examples

spec.pars <- psem::GetSpecPars("Mg_Ca", T = 1e04+100, delta_t = 100,
tau_r = 100, sig.sq_a = 0.1,
seas.amp = 6, N = 10,
tau_p = 4/12,
phi_c = 0,
phi_a = pi/2, sigma.cal = 0.3)
spec.obj <- do.call(psem::ProxyErrorSpectrum, spec.pars)
#> Warning: Rounding T to 10100 so that T is an odd integer multiple of delta_t

ErrDiff2TimeSlices(spec.obj, 1100, 1100, 13*spec.pars$delta_t)
#> Joining with `by = join_by(component)`
#> Warning: There was 1 warning in `mutate()`.
#>  In argument: `sigma.diff = sqrt(var.diff)`.
#> Caused by warning in `sqrt()`:
#> ! NaNs produced
#>               component   var.tau.1   var.tau.2   var.tau.12           cov
#> 1     Aliasing.seasonal 0.002048447 0.002048447  0.004096894  8.044995e-19
#> 2   Aliasing.stochastic 0.017383883 0.017383883  0.034767766  6.831719e-18
#> 3          Bioturbation 0.004433221 0.004433221  0.008866443 -9.608726e-05
#> 4      Calibration.unc. 0.090000000 0.090000000  0.180000000  9.000000e-02
#> 5  Individual.variation 0.020659091 0.020659091  0.041318182  7.623165e-18
#> 6            Meas.error 0.006206909 0.006206909  0.012413818  2.127011e-18
#> 7     Reference.climate 0.376940481 0.376940481  0.753880962           Inf
#> 8         Seasonal.bias 6.598576768 6.598576768 13.197153536  6.372738e+00
#> 9    Seasonal.bias.unc. 0.000000000 0.000000000  0.000000000  0.000000e+00
#> 10          Total.error 6.739308319 6.739308319 13.478616638  6.462642e+00
#>        var.diff   sigma.diff
#> 1  4.096894e-03 6.400698e-02
#> 2  3.476777e-02 1.864612e-01
#> 3  9.058617e-03 9.517677e-02
#> 4  1.387779e-16 1.178040e-08
#> 5  4.131818e-02 2.032687e-01
#> 6  1.241382e-02 1.114173e-01
#> 7          -Inf          NaN
#> 8  4.516780e-01 6.720699e-01
#> 9  0.000000e+00 0.000000e+00
#> 10 5.533333e-01 7.438638e-01