Skip to content
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

Document weights #132

Open
ralikwen opened this issue Nov 22, 2021 · 6 comments
Open

Document weights #132

ralikwen opened this issue Nov 22, 2021 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@ralikwen
Copy link

Please add the possibility of using weighted cases.

  • sometimes you have weighted data and you just can't help it
  • sometimes you have a large dataset and it is easier to work with it using weights

... segmented does take weights

@lindeloev
Copy link
Owner

This was added in v0.3.0, but it's not documented yet. Just use y | weights(weight_col) ~ ... on the right-hand side. E.g.:

model = list(
  y | weights(weight_col) ~ 1 + x,
  ~ 0 + x
)

It is visualized as dot size in plot() but otherwise only exerts its effects during sampling. Does this solve your problem?

In any case, I'll keep this issue open as a reminder that weights should be documented better. So if anything raised doubt or seems non-intuitive to you, I'd be grateful for your feedback so I can write it up :-)

@lindeloev lindeloev changed the title Add weights Document weights Nov 22, 2021
@ralikwen
Copy link
Author

This does solve my problem.
Great package, thanks a lot.

@ralikwen
Copy link
Author

ralikwen commented Nov 22, 2021 via email

@lindeloev
Copy link
Owner

I've written a bit about interpreting ELPD differences here: https://lindeloev.github.io/mcp/articles/comparison.html#what-is-loo-cv. See also this thread by LOO champion Aki Vehtari: https://discourse.mc-stan.org/t/interpreting-elpd-diff-loo-package/1628.

It's a bit involved, but let me know if anything is unclear. And it would be great if you could update your StackOverflow reply with anything you learn - or perhaps just this link. I'm sure many future users would appreciate that.

@ralikwen
Copy link
Author

ralikwen commented Nov 22, 2021 via email

@lindeloev
Copy link
Owner

I guess cross-validation (and Bayesian inference in general) is more about quantifying evidence than threshold-like decisions (significant/non-significant).

There's a deeper exploration of the difficulty of estimating the elpd-uncertainty here: https://arxiv.org/abs/2008.10296. My takeaway: elpd-diff can be interpreted as a z-score if the models

  1. Have not-too-similar predictions. One often compares very similar models, so this is a frequent limitation, I think.
  2. Are not misspecified.
  3. Are fitted to non-small data.

@lindeloev lindeloev added the documentation Improvements or additions to documentation label Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants