Code Monkey home page Code Monkey logo

Comments (8)

sjPlot avatar sjPlot commented on May 22, 2024

plevel only applies to models that do actually compute p-values. I think, glmer does produce p-values. In sjp.lmer, I use car::Anova to get approximate p-values, however, I cannot apply this function properly to sjp.int because I don't know how to deal with factors - the anova computes a p-value for the whole predictor, not for each factor level (thus, you would have to create dummy values for each factor level).

showCI only works for plot types eff and emm in sjp.int, just because the packages I use to compute these interactions provide CI-values. I don't know how to compute confidence intervals on conditional interaction / moderation effects - I appreciate any help!

(see this sjPlot-manual for what I understood as "conditional effect")

from sjplot.

rubenarslan avatar rubenarslan commented on May 22, 2024

lmerTest and mixed do p-values for lmer (for each level), but of course Douglas Bates has some doubts about those (and I think when I use the function I prefer to just plot all defined interactions without regard to p-values (i.e. set plevel to 1), so I can compare different plots visually).

I didn't notice showCI works for eff, I don't have smart ideas about how to compute CIs for "cond" either. Maybe you could put this in the docs, though?

"emm" with lmer fails for me, if I use lmerTest I get

Error in summary(fit)$coefficients[-1, 4] : subscript out of bounds

and with plain lme4

Error in colnames<-(*tmp*, value = c("x", "y", "grp", "l.ci", "u.ci", :
'names' attribute [6] must be the same length as the vector [5]

So you pass the fits to another package to compute CIs?

Maybe you can put this on the wishlist then: I would sometimes like to customise options for predictions:

  1. e.g. I prefer to use bootstrapping for SEs/CIs/predictions and
  2. one use case for which I wrote my own prediction function for interactions once involved extrapolating (i.e. going over the range of the real data in newdata) and
  3. in some cases choosing the mean of the covariates for "eff" is not unambiguous (e.g. three equally large birth cohorts) and the user might want a choice

If I get a handle on your codebase, maybe I can contribute something along those lines, I really like the package and dislike that I'm always writing my own not-very-reusable functions for plotting coefficients, predictions etc.

from sjplot.

sjPlot avatar sjPlot commented on May 22, 2024

@1 I have not much experience with bootstrapping yet, so I'm not sure what you are thinking of exactly, and how to implement it?

@2 Would be possible for type = "cond", but I'm not sure how to set custom ranges for predictors in the effects package / effect function (which is the base for type = "eff")?

@3 Which other options may be useful? You can specify the "averaging" effect via the typical parameter (in effect), which must be a function. Median?

from sjplot.

rubenarslan avatar rubenarslan commented on May 22, 2024

wrote you an email regarding 1.
Re2: I haven't used effects before, but it seems like this (and the bool problem) would be some things to submit to the maintainer?

Re3: I wasn't familiar with that, thanks!

from sjplot.

sjPlot avatar sjPlot commented on May 22, 2024

mixed models and type = "emm" should work now. CI's are calculated by the lsmeans package.

from sjplot.

sjPlot avatar sjPlot commented on May 22, 2024

What about this issue? What parts are still "open"?

from sjplot.

rubenarslan avatar rubenarslan commented on May 22, 2024

This works now. You could get pvalues from lmerTest instead of anova.

from sjplot.

sjPlot avatar sjPlot commented on May 22, 2024

Only if you fit the model with lmerTest::lmer, afaik. There's no method in the lmerTest package to obtain p-values from an merMod-object from lame. So, you have to use lmerTest to fit your models, and if you do so, sjPlot will take those p-values provided by lmerTest.

from sjplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.