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

Add support for clm / clmm (ordinal package) #292

Closed
kevinmickey opened this issue Nov 1, 2017 · 8 comments
Closed

Add support for clm / clmm (ordinal package) #292

kevinmickey opened this issue Nov 1, 2017 · 8 comments

Comments

@kevinmickey
Copy link

kevinmickey commented Nov 1, 2017

It would be nice to add support for clm / clmm (from the ordinal package).

> rs = ordinal::clmm(dv~iv+(1|subj),df)
> sjPlot::plot_model(rs,grid = FALSE,sort.est = "sort.all",y.offset = .4,type='re')
Error in UseMethod("family") : 
  no applicable method for 'family' applied to an object of class "clmm"

If there's a workaround, let me know!

@strengejacke
Copy link
Owner

What would be the transformed estimates, odds ratios?
I have to find a way to cope with the multiple intercepts, and there are few standard methods (no family() nor predict()). Also, I have to write my own tidier, I guess.

@kevinmickey
Copy link
Author

kevinmickey commented Nov 2, 2017

Thanks for the quick response, and for all your work on his package!

Yes, odds ratios. Sorry if this is dumb -- are the values in the random effects plots transformed?

Definitely not worth too much time on your end -- ordinal may be a dying package. It looks like clm does have predict, but not the mixed model clmm.

I tried rs = brms::brm(dv~iv+(1|subj)+(1|item),df,family='cumulative') with more success. It looks like the levels of different random factors (subj and item) get grouped together on the same plots, rather than separated like they do for lmer. There is active development at https://github.com/paul-buerkner/brms, so they may be able to help standardize the output on their end.

@strengejacke
Copy link
Owner

strengejacke commented Nov 2, 2017

are the values in the random effects plots transformed?

Yes, but you can choose the linear scale by setting tranform = NULL (see also help file on this argument).

Definitely not worth too much time on your end -- ordinal may be a dying package

Maybe, but I just saw that MASS::polr is only supported for effect plots, not for simple forest plots. So I might find some time to implement both.

It looks like the levels of different random factors (subj and item) get grouped together on the same plots, rather than separated like they do for lmer.

Yes, that might be. I haven't tried many different models when implementing random effect plots for rstanarm and brmsfit objects. I'll look into this.

Do you have a reproducible example for the brms-model and/or the clmm-model?

@kevinmickey
Copy link
Author

Do you have a reproducible example for the brms-model and/or the clmm-model?

library(ordinal)
library(sjPlot)
rs = clmm(rating~temp+contact+(1|bottle)+(1|judge),wine)
plot_model(rs,grid = FALSE,sort.est = "sort.all",y.offset = .4,type='re')
rs = brms::brm(rating~temp+contact+(1|bottle)+(1|judge),family='cumulative',wine)
plot_model(rs,grid = FALSE,sort.est = "sort.all",y.offset = .4,type='re')

@strengejacke
Copy link
Owner

strengejacke commented Nov 15, 2017

  • Add polr-support
  • Add clm-support
  • Add clmm-support
  • Add brms-support for cumulative family

@strengejacke
Copy link
Owner

Cumulative family for brms should work in the current dev-version.

@strengejacke
Copy link
Owner

Ok, clmm now supported, but for random effects, currently no CIs are shown. Any ideas how to get CIs from clmm-random effects?

@JCruk
Copy link

JCruk commented Nov 5, 2019

How do we pass clmm object?

tab_model(Mod_clmm)
Error in UseMethod("model_parameters") :
no applicable method for 'model_parameters' applied to an object of class "clmm"

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

No branches or pull requests

3 participants