stan-dev / posteriordb

Database with posteriors of interest for Bayesian inference
176 stars 36 forks source link

Move info to attributes and info() function #121

Closed MansMeg closed 4 years ago

MansMeg commented 4 years ago

Model info, data info, reference_draws info and reference_expectations info should be an info attribute connected to the data, model_code, rpd and rpe objects.

This needs to be handled by write_pdb as well.

Create a function info() to access it all.

eerolinna commented 4 years ago

Is this the same as what the python version currently does (shown below) or something else?

>>> model = my_pdb.model("eight_schools_centered")
>>> data = my_pdb.data("eight_schools")
>>> model.information
{'keywords': ['bda3_example', 'hiearchical'],
 'description': 'A centered hiearchical model for the 8 schools example of Rubin (1981)',
 'urls': ['http://www.stat.columbia.edu/~gelman/arm/examples/schools'],
 'title': 'A centered hiearchical model for 8 schools',
 'references': ['rubin1981estimation', 'gelman2013bayesian'],
 'added_by': 'Mans Magnusson',
 'added_date': '2019-08-12'}
>>> data.information
{'keywords': ['bda3_example'],
 'description': 'A study for the Educational Testing Service to analyze the effects of\nspecial coaching programs on test scores. See Gelman et. al. (2014), Section 5.5 for details.',
 'urls': ['http://www.stat.columbia.edu/~gelman/arm/examples/schools'],
 'title': 'The 8 schools dataset of Rubin (1981)',
 'references': ['rubin1981estimation', 'gelman2013bayesian'],
 'added_by': 'Mans Magnusson',
 'added_date': '2019-08-12'}
MansMeg commented 4 years ago

Yes. Exactly the same but in R.

MansMeg commented 4 years ago

This is now inplemented.