Linear mixed effects models - the basics

  Рет қаралды 61,928

TileStats

TileStats

Күн бұрын

See all my videos at:
www.tilestats.com
1. Simple linear regression vs LMM (01:17)
2. Interpret a random intercept (04:19)
3. Multiple linear regression vs LMM (06:24)
4. Repeated-measures ANOVA vs LMM (08:45)
5. Paired t-test vs LMM (10:38)

Пікірлер: 60
@Grbec4
@Grbec4 Жыл бұрын
Great explanation and the visuals take it to the next level. Thank you very much!
@MrRangerXdxY15
@MrRangerXdxY15 Жыл бұрын
I have yet to see such a good video explaining LMM. Thanks from Zürich!
@kendesmarais9018
@kendesmarais9018 Жыл бұрын
Excellent job explaining this in an understandable way! Thank you so much!
@nafisanwari6288
@nafisanwari6288 Жыл бұрын
Superbly explained with great visuals
@EcologyInsights
@EcologyInsights 10 ай бұрын
This is the best video I’ve seen on this topic.
@user-lo2du8bu6p
@user-lo2du8bu6p Жыл бұрын
Spectacularly well explained. Thanks for that.
@fabioramilli8863
@fabioramilli8863 Жыл бұрын
Excellent explanation! I wish I had seen this video years ago, I would have saved myself a lot of time to get in to the topic...
@22ndCatch
@22ndCatch 6 ай бұрын
Watched four videos on this, and this was the one that made it click. Thanks for your relatable breakdown!
@nataliastefanikova3238
@nataliastefanikova3238 Жыл бұрын
I finally understand the topic! Thank you so much,
@reidl4767
@reidl4767 Жыл бұрын
Fantastic explanation! Thank you :)
@lors6739
@lors6739 9 ай бұрын
Thank you very much. This is very helpful for a person who has no prior knowledge to statistic. This will definitely help my research project.
@juditmaymo
@juditmaymo 3 ай бұрын
Incredible video!!
@jamesbelongini5371
@jamesbelongini5371 Жыл бұрын
this is great, thank you.
@jonascruz6562
@jonascruz6562 Жыл бұрын
Great explanation !!! Thank you
@jonascruz6562
@jonascruz6562 Жыл бұрын
One more subscriber!! Greetings from Brazil
@HeyImRod
@HeyImRod 8 ай бұрын
Thanks, super clear!
@tshepisomokoena5075
@tshepisomokoena5075 4 ай бұрын
Great video!
@shipship6479
@shipship6479 Жыл бұрын
I really enjoyed your video and I have a few questions. Could you please explain when a linear mixed model can be used in situations where there are missing values, such as when only two time points are measured and some subjects are not measured at one of the time points? Also, I'm curious if the random intercept model(two measurements) still has the same p-value as ANOVA with paired-t when dealing with missing values. Thank you!
@basilio8417
@basilio8417 Жыл бұрын
Hello Andreas. First, congratulations on your magnificent videos. They are crystal clear and a very good resource. I have made some calculations and it seems that the linear regression model matches the one you showed at the beginning of the video, although the intercept I calculated is 93.0. The rest is the same as you. I don't know if I am missing something. Thank you!
@tilestats
@tilestats Жыл бұрын
How did you calculate? Did you use a software?
@basilio8417
@basilio8417 Жыл бұрын
@@tilestats I calculated it with both SPSS and Medcalc, and the results were the same. I can send you the file if you want. Thank you
@basilio8417
@basilio8417 Жыл бұрын
Oh, no, sorry, I have checked again and there was an error copying the values. The result is fine
@gangwang1658
@gangwang1658 Жыл бұрын
Excellent explanation! If we have a linear model lm2=weights ~ weeks + personId, then Sum of Squared Error or Residual Standard Error will be 11.8 which is close to LMM model with random intercepts. And Even more if we use a interaction terms "weeks*PersonID" then SSE is 4.5. So, how do we explain the benefits of LMM for these models?
@tilestats
@tilestats Жыл бұрын
In addition to the things that I discuss in the video, such as that of assumptions, you need to estimate more parameters in the LM model. If we would have 100 individuals, the LM would estimate at least 100 parameters with associated p-values (which affect the degrees of freedom). Since we are not interested in making inferences on each individual, it makes more sense to use LMM because you then treat the individuals only as a random effect.
@yolandayeung3225
@yolandayeung3225 Жыл бұрын
Great video! What if I have independent samples across 3 times measurement time?
@tilestats
@tilestats Жыл бұрын
Then you simply use linear regression: kzfaq.info/get/bejne/d7aPfpqExrHPeXk.html
@fazlfazl2346
@fazlfazl2346 10 ай бұрын
Hi. Great video. Are there any slide or notes for these lectures that are available????
@tilestats
@tilestats 10 ай бұрын
Check my homepage: www.tilestats.com/shop/
@yvet598
@yvet598 Жыл бұрын
interesting example! But I still have a question: in this example, reason for causing failure is that individuals have different weights at begin, if we use traditional liner model and just adjust this factor as a covariate, is that ok? and what's the different between the two models?
@tilestats
@tilestats Жыл бұрын
From 7:00 I compare the two methods.
@yvet598
@yvet598 Жыл бұрын
Thanks for your answer, sorry, I just misunderstood the meaning in 7:00, I watched it again. And if the LMM is the blue line, is LM the orange line, which means the two methods are different in shape and position? And there is a suppose that random effects should have more than 5 levels, or you can use the fixed effect, is that means in that way LM is equal to LMM (for LM just include fixed effect)?
@raihanalmiski3173
@raihanalmiski3173 Жыл бұрын
Thanks for the explanation, if the subject treat as random effect, then what is the fixed effect?
@tilestats
@tilestats Жыл бұрын
Not sure I understand your question.
@raihanalmiski3173
@raihanalmiski3173 Жыл бұрын
@@tilestats you say in the video, the subject is a random effect, then which variable treat as fixed effect? 🙏
@tilestats
@tilestats Жыл бұрын
In this example, the intercept is random whereas the slope is fixed (because all 4 individuals are assumed to have the same weight loss). Watch the second video, which will give you more examples between random and fixed effects: kzfaq.info/get/bejne/pa9hkraHlrjUlpc.html
@bessidhoummahfoudh3757
@bessidhoummahfoudh3757 2 жыл бұрын
Can this be used as a replacement to T-tests when the samples are small (e.g., 16 per group)?
@tilestats
@tilestats 2 жыл бұрын
No, but a t-test works fine for small sampels, as long as you fulfill the assumptions.
@bessidhoummahfoudh3757
@bessidhoummahfoudh3757 2 жыл бұрын
@@tilestats my samples are small (16 /16) and only random assignment was conducted, so I am violating one assumption (random selection)...what are the best tests for testing the means differencs withing groups and between groups? Thank you!
@tilestats
@tilestats 2 жыл бұрын
If you took a sample of 32 independent subjects and randomly assigned them into two groups, it sounds like an unpaired t-test is appropriate. Have a look at this video: kzfaq.info/get/bejne/mr96f7in1Ja1Zps.html
@bessidhoummahfoudh3757
@bessidhoummahfoudh3757 2 жыл бұрын
@@tilestats ok I'll thank you very much for your help!
@kendesmarais9018
@kendesmarais9018 Жыл бұрын
Can you recommend a text (in english) that addresses the broader subject of mixed effects models in just as an understandable way as your video?
@tilestats
@tilestats Жыл бұрын
No, sorry. Internet is my main source nowadays.
@will74lsn
@will74lsn 2 ай бұрын
can I find somewhere examples of random coefficient models where the variable of the random coefficient is not continuous but categorical? ideally written with STATA or SPSS?
@tilestats
@tilestats 2 ай бұрын
Have you seen the second video? kzfaq.info/get/bejne/pa9hkraHlrjUlpc.html
@will74lsn
@will74lsn 2 ай бұрын
@@tilestats thank you for your answer. The example is with weeks as continuous (slope). Was there a random coefficient with a categorical variable that I missed?
@laxmanbisht2638
@laxmanbisht2638 2 жыл бұрын
Are mixed effect models same as random parameter models?
@tilestats
@tilestats 2 жыл бұрын
Yes, it has a lot of names en.wikipedia.org/wiki/Multilevel_model
@OMARRAFIQUE-oz5td
@OMARRAFIQUE-oz5td 10 ай бұрын
At 11:26, -6.0, -18.0 and -21.0 are not intercepts. They are slopes of Subjects 2, 3 and 4 with the slope of Subject 1 as the reference. Please correct me if I am wrong.
@tilestats
@tilestats 10 ай бұрын
All individuals have the same slope because the lines are parallel. -6.0, -18.0 and -21.0 are how much lower the intercepts are for subject 2, 3 and 4 compared to the reference person, which is person 1.
@OmarRafique-op7bv
@OmarRafique-op7bv 10 ай бұрын
@@tilestats Thanks for reply but my question is how can we talk about individual slopes in a simple linear model which is not a mixed effects model. In a LM there is one overall intercept and every independent variable has a slope associated with it but you are associating intercepts with every individual independent variable. Can't get it.
@tilestats
@tilestats 10 ай бұрын
A simple linear regression model like this (as explained in the beginning of the video): Weight = intercept + Weeks can only have one intercept. Using a multiple linear regression model, we can treat the individuals as a factor (because we have repeated measurements of the same subjects): Weight = intercept + Weeks + Subjects This model has several intercepts. Have a look at my video about multiple linear regression to get the basic idea to include a factor in linear regression: kzfaq.info/get/bejne/d7aPfpqExrHPeXk.html
@javierhernando5063
@javierhernando5063 Жыл бұрын
I can just don't get how you explain the interaction time:group of intervention in a simple clinical trial in a longitudinal study. When is significant time:group of intervention, does it mean that time has an effect on the results? But the patients are under a trial intervention? This means something I guess. How would you explain it?
@tilestats
@tilestats Жыл бұрын
The interaction time:group (for example Group A and B) means that group A and B have different slopes. Have you seen my second video about Linear mixed-effects models? In this video, I show that the ones on diet A lose weight faster compared to the ones on diet B, given that the interaction term is significant.
@javierhernando5063
@javierhernando5063 Жыл бұрын
@@tilestats I have seen it now, really good video and it explains the evolution of the 2 diets across time. So, imagine if you just have one group, measuring the effect of diet 1 across time; how would you put it in words that time as a covariate has a significant value?
@tilestats
@tilestats Жыл бұрын
That the slope is significantly different from zero, which means that the diet significantly change the weight over time.
@OMARRAFIQUE-oz5td
@OMARRAFIQUE-oz5td 10 ай бұрын
At 8.21, you say that "multiple leaner regression model does not give an overall intercept". This is confusing as it is actually the expected value of the response variable when all predictors equal zero. Please clarify.
@tilestats
@tilestats 10 ай бұрын
Multiple linear regression gives intercepts for each individual in this example, but the output does not give an overall (mean) intercept for all individuals.
@OMARRAFIQUE-oz5td
@OMARRAFIQUE-oz5td 10 ай бұрын
​@@tilestats So it is only for this example. When does multiple linear regression give an overall slope? Could you please point me towards a case?
@chrislloyd5415
@chrislloyd5415 Жыл бұрын
There is absolutely nothing wrong with the fixed effects model. Using a dummy variable for each individual captures the dependence within individual that would otherwise be there. In fact, it is a more robust solution since the normal assumption may be incorrect. In the example you give, there is absolutely no reason to make the almost untestable assumption that the intercepts a a draw from a normal distribution. And if we are are interested in the effect of dieting, why would we make an extra untestable assumption. Bottom line is that RE models are ill-advised in most situations. BTW: I am a Professor of Statistics.
@vic7181vic
@vic7181vic Жыл бұрын
Thank you so much for your excellent explanations. Can you please create a video that explains in simple terms that when we should consider a variable "random" and when "fixed"? As some feedback, is it possible to pronounce "d" in the word "moDel"? You pronounce it "moWel". This and other odd pronounciations distract the listener.
Linear mixed effects models
18:37
Matthew E. Clapham
Рет қаралды 218 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 107 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 10 МЛН
Lecture 9.1 Introduction to Mixed Effects Models
11:13
IxD Online: UCSD & Coursera
Рет қаралды 49 М.
Having Fun with Random Effects in Mixed Models (GLMMs)
12:37
Chloe Fouilloux
Рет қаралды 1,7 М.
(Simplified) Linear Mixed Model in R with lme()
26:17
LiquidBrain Bioinformatics
Рет қаралды 64 М.
Mixed Model Notation - A Simple Explanation
20:42
Quant Psych
Рет қаралды 23 М.
How to choose an appropriate statistical test
18:36
TileStats
Рет қаралды 122 М.
Fixed and random effects with Tom Reader
8:09
University of Nottingham
Рет қаралды 185 М.
Mixed Effects Models: A Conceptual Overview Using R
35:03
PsychED
Рет қаралды 8 М.
How to decide whether an effect is fixed or random in mixed models
11:33
Intro to Mixed Effect Models
15:41
Methods in Experimental Ecology I
Рет қаралды 96 М.