-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Probabilistic location of points of change for Bayesian models #37
Comments
Let me clarify what you said, past-Dom: The data <- modelbased::estimate_relation(lm(Sepal.Width ~ poly(Petal.Length, 3), data = iris))
modelbased::describe_nonlinear(data, x = "Petal.Length")
#> Start | End | Length | Change | Slope | R2
#> ---------------------------------------------
#> 1.00 | 3.62 | 0.36 | -1.03 | -0.39 | 0.09
#> 3.62 | 6.90 | 0.54 | 0.51 | 0.16 | 0.09 Created on 2021-05-25 by the reprex package (v1.0.0) However, in a Bayesian / bootsrapped context, we have many iterations of that "curve". So we could, in theory, get the location of a given inversion across all draws, and thus have a distribution of these locations. And conclude something like; "the relationship between x and y goes from negative to positive at around 0.33 (95% CI [0.21, 0.42])". This comes with some critical issues:
I'm not sure it's an issue worth looking further into, especially since |
Is the idea that this would work with smooths as well? If so, I suggest having a look here: https://gavinsimpson.github.io/gratia/reference/derivatives.html Also, I think @lindeloev might know a thing or two about change points... (: |
I think this is a pretty useful idea and something I could see myself using regularly! Random thoughts:
|
The mathematical term for this "point of inversion" is "inflection point". I would suggest using that language. |
One important thing to bear in mind is that when summarizing multiple curves, the computation needs to be done on the curves (curvewise), not on points collapsing across curves (pointwise). See https://mjskay.github.io/ggdist/reference/curve_interval.html for discussion |
Ah, sorry I understood it as the first derivative. "Inflection point" is good. My other thoughts are still relevant, I think. Maybe it could be generalized so the user can choose which derivative to find maximum of: f': Extrema |
By locating the points of change (using
find_inversions
) on all the posterior draws of the link we could have a uni/multi-modal distribution of points of change.The text was updated successfully, but these errors were encountered: