-
-
Notifications
You must be signed in to change notification settings - Fork 445
Open
Description
Hi,
One of the arguments for the function az.from_pystan()
is "observed_data". According to the docs "observed data" is extracted from the posterior.data
.
My Stan model uses the "transformed data"-section extensively and I would like to extract variables defined here intoaz.InferenceData
-object.
Is it possible to make sure that also the data from "transformed data" can be selected for "observed data"?
The corresponding error-log:
File "/Users/HJA/PycharmProjects/ufc/scripts/sample.py", line 58, in sample
return az.from_pystan(
File "/Users/HJA/opt/anaconda3/envs/ufc/lib/python3.10/site-packages/arviz/data/io_pystan.py", line 1079, in from_pystan
).to_inference_data()
File "/Users/HJA/opt/anaconda3/envs/ufc/lib/python3.10/site-packages/arviz/data/io_pystan.py", line 609, in to_inference_data
obs_const_dict = self.observed_and_constant_data_to_xarray()
File "/Users/HJA/opt/anaconda3/envs/ufc/lib/python3.10/site-packages/arviz/data/base.py", line 65, in wrapped
return func(cls)
File "/Users/HJA/opt/anaconda3/envs/ufc/lib/python3.10/site-packages/arviz/data/base.py", line 65, in wrapped
return func(cls)
File "/Users/HJA/opt/anaconda3/envs/ufc/lib/python3.10/site-packages/arviz/data/io_pystan.py", line 573, in observed_and_constant_data_to_xarray
vals = np.atleast_1d(posterior_model.data[key])
KeyError: 'y1'
Metadata
Metadata
Assignees
Labels
No labels