arviz.PyStan2SamplingWrapper.sel_observations#

PyStan2SamplingWrapper.sel_observations(idx)#

Select a subset of the observations in idata_orig.

Not implemented: This method must be implemented on a model basis. It is documented here to show its format and call signature.

Parameters:
idx

Indexes to separate from the rest of the observed data.

Returns:
modified_observed_datadict

Dictionary containing both excluded and included data but properly divided in the different keys. Passed to data argument of model.sampling.

excluded_observed_datastr

Variable name containing the pointwise log likelihood data of the excluded data. As PyStan cannot call C++ functions and log_likelihood__i is already calculated during the simultion, instead of the value on which to evaluate the likelihood, log_likelihood__i expects a string so it can extract the corresponding data from the InferenceData object.