Skip to contents

Appends normal draws from the fit's already-computed covariance to its raw posterior. Deprecated in favour of ctOptimUncertainty with uncertainty = 'stored', which does the same on both backends.

Usage

ctFitAddSamples(fit, nsamples, cores = 2)

Arguments

fit

fit object

nsamples

number of samples desired

cores

number of cores to use

Value

fit object with extra samples

Details

These are pseudo-posterior draws from the fitted covariance, not posterior draws from a sampler. ctFitUncertainty with uncertainty = 'sample' is the latter – Hamiltonian Monte Carlo from an optimized ctJuliaFit – and is a different object, not another route to this one.

Deprecated in favour of ctOptimUncertainty(fit, uncertainty = 'stored', finishsamples = n), which draws from the same covariance for the same zero model evaluations, works on a ctJuliaFit as well as a ctStanFit, and records the new sample count in $uncertainty$settings. It also replaces the draws rather than appending to them: appending normal draws to a posterior that came from uncertainty='is' or 'bootstrap' leaves part of each in one matrix with nothing recording the mixture, which is what this function does.

ctAddSamples is the same function under its pre-3.11 name; both are deprecated together.

Examples

if (FALSE) { # \dontrun{
newfit <- ctOptimUncertainty(ctstantestfit, uncertainty = 'stored',
  finishsamples = 30, cores = 1)
} # }