{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/bayesplot/issues/82","repository_url":"https://api.github.com/repos/stan-dev/bayesplot","labels_url":"https://api.github.com/repos/stan-dev/bayesplot/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/bayesplot/issues/82/comments","events_url":"https://api.github.com/repos/stan-dev/bayesplot/issues/82/events","html_url":"https://github.com/stan-dev/bayesplot/pull/82","id":217299718,"number":82,"title":"Loo predictive checks","user":{"login":"jgabry","id":7796803,"avatar_url":"https://avatars1.githubusercontent.com/u/7796803?v=3","gravatar_id":"","url":"https://api.github.com/users/jgabry","html_url":"https://github.com/jgabry","followers_url":"https://api.github.com/users/jgabry/followers","following_url":"https://api.github.com/users/jgabry/following{/other_user}","gists_url":"https://api.github.com/users/jgabry/gists{/gist_id}","starred_url":"https://api.github.com/users/jgabry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgabry/subscriptions","organizations_url":"https://api.github.com/users/jgabry/orgs","repos_url":"https://api.github.com/users/jgabry/repos","events_url":"https://api.github.com/users/jgabry/events{/privacy}","received_events_url":"https://api.github.com/users/jgabry/received_events","type":"User","site_admin":false},"labels":[{"id":379904777,"url":"https://api.github.com/repos/stan-dev/bayesplot/labels/feature","name":"feature","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-03-27T16:20:02Z","updated_at":"2017-03-29T18:00:25Z","closed_at":"2017-03-28T23:08:02Z","pull_request":{"url":"https://api.github.com/repos/stan-dev/bayesplot/pulls/82","html_url":"https://github.com/stan-dev/bayesplot/pull/82","diff_url":"https://github.com/stan-dev/bayesplot/pull/82.diff","patch_url":"https://github.com/stan-dev/bayesplot/pull/82.patch"},"body":"Introduces `ppc_loo_pit`, `ppc_loo_intervals`, `ppc_loo_ribbon` functions. \r\n\r\ncloses #72 \r\n\r\n-----\r\n\r\n#### Examples\r\n\r\nWe'll use __rstanarm__ and __loo__ to get stuff to work with in order to demonstrate the `ppc_loo_*` functions (__rstanarm__ user's won't actually need to do all of this because `pp_check` will do it internally.)\r\n\r\n```r\r\nlibrary(rstanarm)\r\nlibrary(loo)\r\n\r\nfit <- stan_lmer(log_radon ~ floor + log_uranium + floor:log_uranium\r\n                    + (1 + floor | county), data = radon)\r\ny <- radon$log_radon\r\nyrep <- posterior_predict(fit)\r\nlw <- psislw(-log_lik(fit))$lw_smooth\r\n```\r\n\r\nLOO PIT check\r\n```r\r\ncolor_scheme_set(\"purple\")\r\nppc_loo_pit(y, yrep, lw)\r\n```\r\n![loo_pit1](https://cloud.githubusercontent.com/assets/7796803/24366488/435849ce-12e7-11e7-9e2e-0fb6ac966e97.png)\r\n\r\n```r\r\nppc_loo_pit(y, yrep, lw, compare = \"normal\")\r\n```\r\n![loo_pit2](https://cloud.githubusercontent.com/assets/7796803/24366489/435bc3d8-12e7-11e7-987c-baed7093bc22.png)\r\n\r\nLOO predictive intervals vs observations\r\n```r\r\nppc_loo_intervals(y[1:50], yrep[, 1:50], lw[, 1:50], prob = 0.5, size = .5)\r\n```\r\n![loo_intervals](https://cloud.githubusercontent.com/assets/7796803/24366498/4b9c7ba0-12e7-11e7-85eb-4b21f32e9584.png)"},"comment":{"url":"https://api.github.com/repos/stan-dev/bayesplot/issues/comments/290172217","html_url":"https://github.com/stan-dev/bayesplot/pull/82#issuecomment-290172217","issue_url":"https://api.github.com/repos/stan-dev/bayesplot/issues/82","id":290172217,"user":{"login":"jgabry","id":7796803,"avatar_url":"https://avatars1.githubusercontent.com/u/7796803?v=3","gravatar_id":"","url":"https://api.github.com/users/jgabry","html_url":"https://github.com/jgabry","followers_url":"https://api.github.com/users/jgabry/followers","following_url":"https://api.github.com/users/jgabry/following{/other_user}","gists_url":"https://api.github.com/users/jgabry/gists{/gist_id}","starred_url":"https://api.github.com/users/jgabry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgabry/subscriptions","organizations_url":"https://api.github.com/users/jgabry/orgs","repos_url":"https://api.github.com/users/jgabry/repos","events_url":"https://api.github.com/users/jgabry/events{/privacy}","received_events_url":"https://api.github.com/users/jgabry/received_events","type":"User","site_admin":false},"created_at":"2017-03-29T18:00:25Z","updated_at":"2017-03-29T18:00:25Z","body":"@avehtari I just added an argument for this to `ppc_loo_intervals`. You can now do\r\n\r\n```r\r\nppc_loo_intervals(..., order = \"index\")  # default\r\nppc_loo_intervals(..., order = \"median\")\r\n```\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"jgabry"}}