Skip to content

Revised multilevel modeling notebook #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 28, 2022
Merged

Revised multilevel modeling notebook #468

merged 3 commits into from
Nov 28, 2022

Conversation

ghost
Copy link

@ghost ghost commented Nov 21, 2022

This is an update to the multilevel modeling notebook that makes two main changes:

  1. Removes the independent floor vs basement parameterization from the current notebook. Expressing the floor and basement measurements as entirely independent is not a great starting point, given that they are measuring the exact same phenomenon, just from a different location. This reverts to the covariate model that simply uses floor as an offset. I think this is less confusing overall.
  2. Adds the non-centered parameterization. While perhaps redundant with another notebook, its an important component of modeling this problem correctly.

I am also removing the GLM-hierarchical notebook, as it is almost completely redundant with this one, now that it no longer uses the extinct glm submodule.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@fonnesbeck fonnesbeck changed the title Revised multilevel modeling notebook; removed hierarchical GLM notebook Revised multilevel modeling notebook Nov 21, 2022
@fonnesbeck fonnesbeck requested a review from twiecki November 21, 2022 00:35
@twiecki
Copy link
Member

twiecki commented Nov 22, 2022

So far I only skimmed but this looks excellent. Still need to solve pre-commit issues with the myst files.

@fonnesbeck
Copy link
Member

Pre-commit issues fixed.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 25, 2022

View / edit / reply to this conversation on ReviewNB

twiecki commented on 2022-11-25T14:46:17Z
----------------------------------------------------------------

Can we add axis labels?


fonnesbeck commented on 2022-11-25T22:56:19Z
----------------------------------------------------------------

Added.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 25, 2022

View / edit / reply to this conversation on ReviewNB

twiecki commented on 2022-11-25T14:46:18Z
----------------------------------------------------------------

Curious why these look so different from before.


fonnesbeck commented on 2022-11-25T16:29:36Z
----------------------------------------------------------------

Probably a function of the odd parameterization that is in the current version (assuming floor and basement are independent). This revision matches what you see in Gelman.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 25, 2022

View / edit / reply to this conversation on ReviewNB

twiecki commented on 2022-11-25T14:46:19Z
----------------------------------------------------------------

You could link to my blog post where I go into more detail: https://twiecki.io/blog/2017/02/08/bayesian-hierchical-non-centered/


fonnesbeck commented on 2022-11-25T22:58:56Z
----------------------------------------------------------------

Added a link.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 25, 2022

View / edit / reply to this conversation on ReviewNB

twiecki commented on 2022-11-25T14:46:20Z
----------------------------------------------------------------

You could also mention somewhere that instead of a hierchical model, we can place geospatial distribution over the counties radon levels like here: https://www.pymc-labs.io/blog-posts/spatial-gaussian-process-01/


fonnesbeck commented on 2022-11-25T23:02:36Z
----------------------------------------------------------------

Added a link.

Copy link
Member

Probably a function of the odd parameterization that is in the current version (assuming floor and basement are independent). This revision matches what you see in Gelman.


View entire conversation on ReviewNB

Copy link
Member

Added.


View entire conversation on ReviewNB

Copy link
Member

Added a link.


View entire conversation on ReviewNB

1 similar comment
Copy link
Member

Added a link.


View entire conversation on ReviewNB

@twiecki twiecki merged commit fed95b2 into pymc-devs:main Nov 28, 2022
@twiecki
Copy link
Member

twiecki commented Nov 28, 2022

Great stuff, this classic is in great shape now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants