Skip to content

Instantly share code, notes, and snippets.

@utkarsh-maheshwari
Last active September 8, 2022 07:14
Show Gist options
  • Save utkarsh-maheshwari/8d4cd2fd84c763bf85291c3f0881d588 to your computer and use it in GitHub Desktop.
Save utkarsh-maheshwari/8d4cd2fd84c763bf85291c3f0881d588 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattiasthalen
Copy link

Not sure if this has been abandoned. But I tried it in colab with just the prior predictive.

It failed due to this:

groups = ["posterior_predictive", "prior_predictive"]

I removed that and modified the loop to check for groups with _predictive in its name:

for group in groups:
    if '_predictive' in group:
        item = getattr(data, group)
        if y_ppc in item and y_ppc_group is None:
            y_ppc_group = group
        elif y_ppc in item:
            print("Warning, duplicate variable names for y_ppc, "
            "using variable from group {}".format(y_ppc_group))

Unfortunately it crashed.

@utkarsh-maheshwari
Copy link
Author

Hi @mattiasthalen! Did you try plot_lm function? This gist is just a prototype.

@mattiasthalen
Copy link

@utkarsh-maheshwari no, I stumbled on this when googling. But I did now and it seems to work good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment