MCMCStreamTempering

Documentation for MCMCStreamTempering.

MCMCStreamTempering.dist_val_tupleMethod
dist_val_tuple(spl::Sampler{<:MHSampler}, vi::VarInfo)

Return two NamedTuples.

The first NamedTuple has symbols as keys and distributions as values. The second NamedTuple has model symbols as keys and their stored values as values.

source
MCMCStreamTempering.estimate_obs_uncMethod
estimate_obs_unc(x,y; span=0.8)

Estimate std-deviation of observation error in a series by inspecting the residuals of a loess model y ~ x. Keyword argument span controls the smoothmess of the fit. A value of 1 corresponds to a straight line, 0.8 is adequate for a single maximum. The fit can be inspected by plotting pred ~ x in the same plot as y ~ x.

Return value is a NamedTuple

  • std_obsunc: estimated standard deviation of observation uncertainty
  • SS_obsunc: sum of squared residuals of observation uncertainty
  • pred: predictions by the loess model, useful to inspect smoothness.
source
MCMCStreamTempering.estimate_prop_weights_model_uncMethod
estimate_prop_weights_model_unc(obs_streams, std_eff_streams)

Estimate ratio of spread / stddev(obs_error), where spread is the 95% interval of observed value.

This is helpful for allowing larger relative model discrepancy (per observation uncertainty) for the streams with a larger spread per observation uncertainty.

Arguments

  • obs_streams: ComponentVector or NamedTuple stream -> observations
  • std_eff_streams: ComponentVector or NamedTuple stream -> std_dev(obs_error)

Result NamedTuple with ComponentVectors

  • w: multiplicators of allowed model discrepancy. Specifically w0 ./ minimum(w0)
  • w0: original ratios spread / stddev(obs_error)
source