Using lme4 in R for Mixed Models

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии •

  • @cabreram94
    @cabreram94 4 месяца назад +5

    Thanks for these videos. I just finished my master's thesis, and I'm working on transforming it into a publishable paper. I'm working with MLM and lme4 as well. You can't imagine how helpful your channel has been!

    • @abhishekkurup
      @abhishekkurup 14 дней назад

      In the process of doing the same actually, good luck!

  • @janja7471
    @janja7471 4 месяца назад

    Dude, your videos are often far more helpful (and entertaining) than any textbook. Keep going!

  • @avobubble
    @avobubble 3 дня назад

    This is great stuff ! Why isn't the flexplot on CRAN ? It seems this would be helpful in agricultural sciences.

  • @muhammedhadedy4570
    @muhammedhadedy4570 3 месяца назад

    What was that?
    You are hilarious. I was looking for a video of mixed models for my paper, and then I came across your video.
    This RUclips channel should have millions of subscribers.
    Please keep up the great work.
    Greetings from Egypt.
    👏👏👏👏👏

  • @alessaxi7521
    @alessaxi7521 24 дня назад

    Thank you very much, Dustin, I'm reading your papers. It would be very appreciated if you focus on categorical predictors and how to visualize data. Additionally, sometimes it's hard to have a general statement on your results when your model finds a significant planned contrast but post hoc tests on estimated marginal means do not :) Especially when your reviewer really cares about the p-values of post hoc 😂byeee

  • @brazilfootball
    @brazilfootball 4 месяца назад

    This was incredibly helpful, thank you! It would be interesting to understand why one might also include the grouping variable as a fixed effect. I've seen such models, but the only explanation I got was: "If you don't include it as a fixed effect, then you will be assuming that the differences between levels are exactly zero on average, across all levels." If you have time, could you expand upon this sometime, please?

    • @QuantPsych
      @QuantPsych  4 месяца назад +1

      That's close, but not quite. If you fix the grouping variable, you assume the difference between the two groups is the same across clusters. So, maybe your grouping variable is gender (male/female) and your outcome is math achievement. A fixed effect model assumes that difference between boys/girls is the same across all schools. Maybe that's a reasonable assumption. But maybe there's some schools that have, for example, male tutoring programs. You might in that case see a much smaller difference between males and females.

    • @brazilfootball
      @brazilfootball 4 месяца назад

      @@QuantPsych Sorry, I got lost in the terminology. I should have said "what if the cluster variable (I called it the group variable), like "person_id" in this video, was also a fixed effect?" Sticking with your example, if instead of "person_id", we had "student" nested in school as cluster variables, why might we want to make student a fixed effect as well? For the same reason (male tutoring programs)? EDIT: After a bit more searching online, it seems we wouldn't include the cluster variable (person_id) as a fixed effect as well. It's one or the other, not both.

  • @ZeNtAuRuSsS
    @ZeNtAuRuSsS 6 месяцев назад +2

    Hey! Thank you for your videos, it's helped me a lot to understand basic multilevel modelling (need it for my masters thesis)! I was wondering where to find the flexplot-package, though? I tried to install it in RStudio but it doesn't show up.

    • @QuantPsych
      @QuantPsych  5 месяцев назад +2

      You have to install through github: devtools::install_github("dustinfife/flexplot")

  • @КостадинКостадинов-ц8е
    @КостадинКостадинов-ц8е 4 месяца назад +1

    Keep videos coming. There are awesome

  • @ghaiszriki7912
    @ghaiszriki7912 4 месяца назад +1

    Thanks a lot, it was very clear as usual.
    I do have a small question about the Time variable. If we don't include the time in the model, do we really account for the repeated measures, event thous we had the ID as a cluster variable.
    Maybe my question is naif, but the "TIME" variable still confuising for me when build models.
    Thank you again (:

    • @QuantPsych
      @QuantPsych  4 месяца назад

      Yes and no. You are accounting for the dependencies with the cluster variable. But, if you're missing an important variable (time) then your model will be biased, just as a regular regression model would be biased if it was missing an important explanatory variable.

  • @merylzim4431
    @merylzim4431 3 месяца назад

    Hi Dustin, your videos are so helpful , thank you so much! Is it possible to have the version of R you are using in the video description ? It can be great for the futur viewers or.. the dinosors who might have an older version for obscure reason 🤔

  • @ertugruluyar.social
    @ertugruluyar.social 4 месяца назад

    Thanks for the video, I think it is very good. My problem with using R, you can't model with multiple plausible values as in the PISA dataset. But my biggest problem with that, there is no option for centering around mean, grand mean or z-scores. Could you help me with that, do I know wrong? So, I am gonna do my master thesis with gamlj3 module in jamovi.

    • @QuantPsych
      @QuantPsych  4 месяца назад

      You'll probably have to go to the data tab to do it. Or you can center in excel and reimport into jamovi.

    • @ertugruluyar.social
      @ertugruluyar.social 4 месяца назад

      @QuantPsych Thanks for the response. I can't use the excel because the data is PISA's and only .sav or SAS format available. But I wonder how we could this both with data tab in RStudio and R library that has functions to do it. Could you do a video about it, so that I may use R instead of GUI apps in further researchs?

  • @mehdipoornikoo8274
    @mehdipoornikoo8274 3 месяца назад

    Hi. The link to the dataset seems to be down. Would appreciate it if you could update the link. thanks!

    • @QuantPsych
      @QuantPsych  3 месяца назад +1

      Oops! It should be there now.

  • @stephenomenal1245
    @stephenomenal1245 4 месяца назад

    Thank you for your videos, it always helps me get a grasp of concepts before I read textbooks. Btw, I have successfully installed flexplot from github but I ran into a problem while using visualize function. It gives
    Error in x[["stat"]] : this S4 class is not subsettable
    I tried to figure it out on my own but still left unable to fix the error. Everything else seems to work fine though. Any help would be greatly appreciated!!

    • @QuantPsych
      @QuantPsych  4 месяца назад +1

      Start with a fresh environment and only load flexplot and lmer4. If that works, there may be a conflict with another package your trying to load. I seem to remember there's a package like lmerEffects or something that messes with flexplot.

  • @emmanueljimenez2156
    @emmanueljimenez2156 4 месяца назад

    Hi , I like your videos, I'm doing some analysis for my master studies, can you help me or give me some advice how to model my data? I'm suffering a bit

    • @QuantPsych
      @QuantPsych  3 месяца назад

      You're welcome to take a live class from me and ask as many questions as you want!

  • @catlover6two
    @catlover6two 4 месяца назад

    Sent me for a loop on this one and had me rethinking my whole data :(