bebi103.hmc.sample_cmdstanpy_prior_predictive

bebi103.hmc.sample_cmdstanpy_prior_predictive(seed=None, stan_file=None, sample_kwargs=None, measured_data=None, remove_sample_files=True, no_logging=True)

Draw a prior predictive data set using cmdstanpy. This sets default sample_kwargs for sample_cmdstanpy() for drawing a single prior predictive sample.

Parameters:
  • seed (int, default None) – Seed for Stan’s random number generator.

  • stan_file (str) – Name of file containing stan code.

  • sample_kwargs (dict, default {}) – Arguments to be passed to stan_model.sample(), where stan_model is compiled from stan_file.

  • measured_data (dict, must be supplied) – A dictionary where each key is the variable name of measured data. The value of each entry in the measured_data dictionary is the type of the corresponding data, almost always either int or float. Upon generation of a prior predictive data set, a new dictionary is created with keys given by the keys of measured_data and value given by the generated prior predictive data set.

  • remove_sample_files (bool, default True) – If True, remove CSV files of samples generated by CmdStan.

  • no_logging (bool, default False) – If True, disable logging from Stan.

Returns:

samples – Dictionary containing prior predictive data.

Return type:

dict