How to decide whether an effect is fixed or random in mixed models

Поділитися
Вставка
  • Опубліковано 6 січ 2025

КОМЕНТАРІ • 46

  • @tatjanajak
    @tatjanajak 3 роки тому +32

    How can there be a lecture which makes you wonder, laugh and learn in the same time? But here it is. Awesome as always.

  • @eubutuoy
    @eubutuoy 4 місяці тому +16

    At 3:15 and 3:25 you contradict yourself. Fix it: "if a variable doesn't change within the cluster, then it cannot be fit as a random effect". Other than that, it was a very clear explanation.

    • @odeiasante
      @odeiasante 4 місяці тому

      Yeah.

    • @QuantPsych
      @QuantPsych  3 місяці тому +2

      Good catch! Thanks!

    • @r4ts311
      @r4ts311 2 місяці тому +3

      Thank you, that part was driving me crazy thinking I didnt understand anything

  • @Hanna-Nyasa
    @Hanna-Nyasa Рік тому +6

    I WISH I COULD CLONE YOU AND GET YOU TO TEACH ME 24/7.
    Crazy how much a teacher can change your approach to a subject lol

  • @PradaChanelHouse
    @PradaChanelHouse 2 місяці тому

    I am in a mixed models course, currently. We're half way through the semester, and I have been completely lost. Clicked on your videos, and understood the applied difference between fixed and random effects AND how to visually understand how each variable affects the given model. Thank you for your visuals and explanations!

  • @noa-ps1zu
    @noa-ps1zu Рік тому +4

    insightful, straight to the point, and full of personality. your passion shines through your videos :) keep up the amazing work!

  • @stellar8689
    @stellar8689 2 роки тому +10

    God damn this channel was a gold nugget among all the stats videos I've been looking through to understand LMMs. It doesn't particularly interest me so your enthusiasm and humours definitely keep my attention, not to mention that explanations are great. Thank you!

  • @natsumi883
    @natsumi883 3 роки тому +48

    at 3:25 i think you ment when there is no variation it cannot be set as a random effect? in the emphasis part you say fixed.
    thanks for your videos btw! they are helping me a lot! cheers from brazil

    • @QuantPsych
      @QuantPsych  3 роки тому +22

      Oops! Yes, you're right. I should have set, "...you cannot fit it as a *random* effect."

    • @hc433
      @hc433 2 роки тому +3

      @@QuantPsych you should have set “should have said” right? 😉

    • @donpennino
      @donpennino 2 роки тому +1

      Would that be considered a Type1 or Type 2 error of just a Typ0

    • @donpennino
      @donpennino 2 роки тому +1

      Does seem like error is a real cluster

    • @chiawenkuo
      @chiawenkuo Рік тому

      @@QuantPsychThank you for the verification. I thought so..."no variation, no random effect"

  • @overcup
    @overcup Рік тому +2

    You seem to give two contradictory statements - at about 3:10 you say that mean SES cannot be fit as a random effect, then immediately reiterate that it cannot be fit as a fixed effect. Am I misunderstanding, or is one of those two sentences in error?

    • @olenapo4895
      @olenapo4895 Рік тому

      As well didn't get those sentence

    • @QuantPsych
      @QuantPsych  10 місяців тому

      Oops! The first sentence was correct. I meant to say you can ONLY fit it as a fixed effect.

  • @alessandrachuquipiondo5217
    @alessandrachuquipiondo5217 Рік тому +1

    this is gold, thank you SO MUCH. My thesis is alive bcs of you.

  • @FuJimin-f9y
    @FuJimin-f9y 28 днів тому

    it says that the package "flexplot" is not avaliable for my version of R, how to fix this then?

  • @sergiochavezlazo5362
    @sergiochavezlazo5362 2 роки тому +1

    Amazing video.!!! This channel deserves much more views and subscriptors

  • @QueenShiva1920
    @QueenShiva1920 Рік тому

    Subscribed within the first 10 seconds of the video 🤣 Thanks for making stats lighthearted! It should be fun!

  • @OriginalJoseyWales
    @OriginalJoseyWales 27 днів тому

    Love your videos and your sense of humour - made me laugh. Can you make a video on how to fit cross classified multilevel models in R? Or can anyone direct me to one?

  • @OriginalJoseyWales
    @OriginalJoseyWales 27 днів тому

    Is model.comparison from lme4 package?

  • @SofíaDelgadoMontufar
    @SofíaDelgadoMontufar Рік тому

    Hello so in the cluster i have diferrent schools in my case is different localities and repeated meassures inside them since i have replicates per individual in this case since my locality changes how can i deal with this data

    • @QuantPsych
      @QuantPsych  10 місяців тому

      So you have double nesting!

  • @TheBjjninja
    @TheBjjninja 2 роки тому +1

    Dr. Fife, can you recommend a good book for mixed effect modeling? Thanks

  • @taranaferdous2858
    @taranaferdous2858 5 місяців тому

    OMG!!! I am watching it over and over, especially the part where you moved your face video! HaHaHa. Hilarious. =))
    Thank you so much for making this so easy to understand!!! And fun! :))

    • @QuantPsych
      @QuantPsych  5 місяців тому

      Glad you enjoyed it!

  • @rickpack6700
    @rickpack6700 2 роки тому +1

    Love the Stevie Wonder at the minute mark

  • @jpss9360
    @jpss9360 2 роки тому

    Hello, I want to know that when you have the exact same values or don't vary like in MEANSES you cannot fit as fixed and random effect?

  • @andreaesquivelroman8313
    @andreaesquivelroman8313 10 місяців тому

    This is the best video about statistics I ever seen jajajaja very funny

  • @jingywangy
    @jingywangy Рік тому

    what would you recommend doing when we have more than one random effect variables?

    • @QuantPsych
      @QuantPsych  10 місяців тому

      You can use multiple random effects.

  • @hamidnikbakht1295
    @hamidnikbakht1295 3 роки тому +3

    Easy peasy, lemon squeezy, don't let statistics make you feel queasy! (You're welcome!)

  • @maxduvall9055
    @maxduvall9055 2 роки тому

    I am not sure if ill get a response to this (in time if at all) but I am finishing up my senior thesis right now and about a few days ago I found out that I messed up by trying to treat my repeated measures data (in long form) as normal data in simple linear regression. One of my hypotheses is that two variables (one a binary, and the other continuous) interact. So I expect the slopes to be different between the two groups (from the binary variable). however, I want to make sure I understand this correctly. Because I am testing for that effect I should NOT include the binary variable as a random effect because then I would NOT be able to test for the interaction right? Because the data is in long form, each participant has two measures, and therefor the only random effect I should include is the participants ID and its effect on the intercept right? If I include the random slope of the binary variable, the model accounts for it but it does not give me an estimate nor any information on significance. If anyone knows what I am talking about and can help please let me know! It would be greatly appreciated. Also let me know if you need more information.
    ALSO ALSO I have been trying to use the estimates function in flex plot and I keep getting the following code "Error in str2lang(x) : :1:10: unexpected ')' 1: RDM~1+(1|)" Its very confusing because no matter how hard I look and how many times I check I cannot find an extra parenthesis... I have tried adding and deleting different parantheses in various spots and nothing works... so let me know if you can answer that too.

  • @MrNeytrall
    @MrNeytrall 2 роки тому +1

    As for the AIC comparison, you are misinterpreting it. When you compare AIC, you should look at the value of deltaAIC or even Akaike's weight. The difference of 1 is too small to matter, which means your models don't differ much, so we should apply the parsimony principle and choose a simpler model. (Model Selection and Multi-Model Inference: A Practical Information-Theoretic Approach by Kenneth P. Burnham, David R. Anderson, page 71.) Isn't that what Bayes factor and p-value also pointed to?

  • @djgresearch
    @djgresearch Рік тому

    Loved the intro & great explanation! However, my dependent variable is often binary, say 5 year mortality. Is it easy to adapt the slope and model comparisons to logistic regression?

  • @stephendye2924
    @stephendye2924 3 роки тому +1

    Brilliant. Thanks so much

  • @jorgemmmmteixeira
    @jorgemmmmteixeira 3 роки тому

    When to use both as random and fixed ? Tks

    • @DustinFife
      @DustinFife 3 роки тому +1

      All random effects ALSO have fixed effects. The question isn’t "random or fixed?"...it’s " random/fixed or just fixed?'

    • @jorgemmmmteixeira
      @jorgemmmmteixeira 3 роки тому

      @@DustinFife do you mean that everytime up code a random effect, you also code it as a fixed ? Or behind every coded random effect, has a fixed effect implicit (but not coded )? Tks

    • @QuantPsych
      @QuantPsych  3 роки тому +2

      The first (it has to be coded in). So, this model would not work: y~a + (a +b | ID)

  • @AlceaRose
    @AlceaRose Рік тому

    Hello ! I have been binge-watching all of your videos, as you're the only one who somehow managed to make me understand something to mixed models (so first, thank you for this !) However, when I use model.comparison, the function doesn't display any p.value nor does it show r_squared_change. Do you know why is that ? Did you remove these from the lastest versions of the package ?