prior2posterior | R Documentation |
prior2posterior
applies the gaussian conditioning theorem to an array
of time series corresponding to the simulated responses to several external
forcings (natural, anthropogenic or both) given observations (see equations
12 and 13 in Supplementary Material of Qasmi and Ribes, 2021).
prior2posterior( X_fit, Xo, Sigma_obs, Nres = NULL, centering_CX = T, ref_CX = "year_obs", S_mean = NULL, Sigma_mod = NULL, weights = NULL )
X_fit |
a 3-D array of dimension
|
Xo |
a vector or a matrix. If a vector, |
Sigma_obs |
a sum of a matrix sampling observed internal variability
(tipically returned by |
Nres |
the whished number of realisations in the posterior gaussian sample |
centering_CX |
a logical value indicating whether the constrained time
series must be in anomalies relative to a given period
(see |
ref_CX |
a vector containing the years corresponding to the reference
period if |
weights |
a vector of weights of the same length as the number of models to account for dependencies between models if needed. |
a list of two lists containing the parameters of the unconstrained
(prior) and constrained (posterior) gaussian distributions for the
responses to the forcings in X_fit
. The first (second) list named
uncons
(cons
) contains two other lists, namely mean
and var
. mean
is a concatenation of time series
corresponding to the mean of the distribution for the different forcings.
The name of each element follows the pattern: year_forcing
, eg
1850_nat
for the mean natural response in 1850. var
is the
covariance matrix associated with mu
, sampling the model
uncertainty.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.