{"action":"created","issue":{"url":"https://api.github.com/repos/paul-buerkner/brms/issues/190","repository_url":"https://api.github.com/repos/paul-buerkner/brms","labels_url":"https://api.github.com/repos/paul-buerkner/brms/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/paul-buerkner/brms/issues/190/comments","events_url":"https://api.github.com/repos/paul-buerkner/brms/issues/190/events","html_url":"https://github.com/paul-buerkner/brms/issues/190","id":211341234,"number":190,"title":"feature request: marginal_effects plot for ordinal regression","user":{"login":"silberzwiebel","id":4533862,"avatar_url":"https://avatars2.githubusercontent.com/u/4533862?v=3","gravatar_id":"","url":"https://api.github.com/users/silberzwiebel","html_url":"https://github.com/silberzwiebel","followers_url":"https://api.github.com/users/silberzwiebel/followers","following_url":"https://api.github.com/users/silberzwiebel/following{/other_user}","gists_url":"https://api.github.com/users/silberzwiebel/gists{/gist_id}","starred_url":"https://api.github.com/users/silberzwiebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silberzwiebel/subscriptions","organizations_url":"https://api.github.com/users/silberzwiebel/orgs","repos_url":"https://api.github.com/users/silberzwiebel/repos","events_url":"https://api.github.com/users/silberzwiebel/events{/privacy}","received_events_url":"https://api.github.com/users/silberzwiebel/received_events","type":"User","site_admin":false},"labels":[{"id":284410285,"url":"https://api.github.com/repos/paul-buerkner/brms/labels/feature","name":"feature","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-02T09:54:58Z","updated_at":"2017-03-02T11:19:37Z","closed_at":null,"body":"Hi,\r\n\r\nI'm not sure whether I fully understand the marginal_effects plot yet that I discovered yesterday.\r\nI'm working with ordinal regression and `marginal_effect()`already prints a warning that it's treating the predicted variable as continuous which is likely an invalid assumption for ordinal regressions.\r\n\r\nDo you have any plans to treat the predicted variable in a proper manner for marginal effects plot?\r\nMaybe this is possible by using something similar to the new ppc_bars from bayesplot (see https://github.com/stan-dev/bayesplot/issues/73 )?\r\nSince I did not grasp fully what marginal_effects is actually computing, my feature request might be not doable out of theoretic reasons, though.\r\n\r\nAlternatively, and maybe easier to implement as a work-around I suggest to add horizontal violin plots and/or jitter the data points in vertical direction if one plots the points inside the marginal effects plot like this:\r\n\r\n![marginalordinal](https://cloud.githubusercontent.com/assets/4533862/23501982/0478624c-ff2e-11e6-84ff-258365911b9d.png)\r\n\r\nDoing so gives at least a quick suggestion where the bulk of the ordinal data lies for the value of the predictors."},"comment":{"url":"https://api.github.com/repos/paul-buerkner/brms/issues/comments/283627115","html_url":"https://github.com/paul-buerkner/brms/issues/190#issuecomment-283627115","issue_url":"https://api.github.com/repos/paul-buerkner/brms/issues/190","id":283627115,"user":{"login":"silberzwiebel","id":4533862,"avatar_url":"https://avatars2.githubusercontent.com/u/4533862?v=3","gravatar_id":"","url":"https://api.github.com/users/silberzwiebel","html_url":"https://github.com/silberzwiebel","followers_url":"https://api.github.com/users/silberzwiebel/followers","following_url":"https://api.github.com/users/silberzwiebel/following{/other_user}","gists_url":"https://api.github.com/users/silberzwiebel/gists{/gist_id}","starred_url":"https://api.github.com/users/silberzwiebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silberzwiebel/subscriptions","organizations_url":"https://api.github.com/users/silberzwiebel/orgs","repos_url":"https://api.github.com/users/silberzwiebel/repos","events_url":"https://api.github.com/users/silberzwiebel/events{/privacy}","received_events_url":"https://api.github.com/users/silberzwiebel/received_events","type":"User","site_admin":false},"created_at":"2017-03-02T11:19:37Z","updated_at":"2017-03-02T11:19:37Z","body":"citing from Kruschke (2015, p. 689):\r\n> Figure 23.7 displays aspects of the posterior predictive distribution superimposed on the data. A smattering of credible regression lines is displayed. It must be remembered, however, that the regression lines refer to the underlying metric predicted variable, not to the ordinal predicted variable. Thus, the regression lines are merely suggestive and should be used to get a visual impression of the uncertainty in the slope and intercept. More directly pertinent are the posterior predicted probabilities of each outcome at selected x values marked by vertical lines. At the selected x values, the posterior predicted probabilities of the outcomes are plotted as horizontal bars “rising” leftward away from the vertical baseline. \r\n\r\nHe explains his model using this picture:\r\n![bildschirmfoto 2017-03-02 um 12 17 56](https://cloud.githubusercontent.com/assets/4533862/23505044/eff9103a-ff39-11e6-89ce-0c1dceaf510a.png)\r\n\r\nTrying to translate this to `brms` syntax, I guess he would have run the following:\r\n```\r\nbrm(Y ~ X, family = cumulative(link=probit))\r\n```\r\nThen he would draw from the posterior distribution of the regression coefficient for X to get credible slopes for his regression lines. The intercepts of these regression lines come from an (extra?) intercept parameter he specified in his JAGS model (beta0 in the model picture)."}}
{"actor":{"display_login":"silberzwiebel"}}