View source: R/bd_calc_meas_matrix.R
ygrid is a vector of calendar dates indexed from g = 1,2,...,G. phi_m is a vector of n = 1,2,...,N radiocarbon determinations (fraction modern) with associated uncertainties sig_m. Calculate the measurement matrix M, which has dimensions N x G and for which each element is M_ng = p(phi_m,n|y_g). The total uncertainty of the measurement comes from measurement error (SIG_M, calculated using the measurement error for each measurement) and the calibration curve error (SIK_k, calculated using the uncertainty for the calibration curve at each grid point). These uncertainties (and the associated measurements) should already be "projected" to 1950 equivalents (e.g., in bd_convert_date_samp_to_c14_samp). By default, the grid spacing of ygrid is accounted for in each element of the measurement matrix, M_ng, so that the matrix multiplication M * f is an approximation to the integral over p(y|th) * p(phi|y); the trapezoidal rule is assumed for this, so that the spacing to use for the the integration width is dy_g = (y_(g+1) - y_(g-1)) / 2, where the conventions y_0 = y_1 and y_(G+1) = y_G are used: M_ng -> M_ng * dy_g
1 2 | bd_calc_meas_matrix(ygrid, phi_m, sig_m, calibDf, useSpacing = T,
addCalibUnc = T)
|
ygrid |
A vector of calendar dates indexed by g |
phi_m |
A vector of fraction moderns indexed by n |
sig_m |
A vector of standard deviations for phi_m by n |
calibDf |
Calibration curve (see bd_load_calib_curve) |
useSpacing |
(default TRUE) Whether to account for the spacing of ygrid (see description) |
addCalibUnc |
(default TRUE) Whether to add calibration uncertainty |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.