Тёмный
No video :(

Multilevel modeling in R using lme4 package (Feb 2020): Demo of Hox 2010 Chapter 2 extended example 

Mike Crowson
Подписаться 39 тыс.
Просмотров 47 тыс.
50% 1

Опубликовано:

 

20 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@jaykay9835
@jaykay9835 Год назад
Thank you so much!! You helped me significantly during my bachelor's thesis
@renasfpolis
@renasfpolis 2 года назад
Thanks for the video! Much appreciated.
@stinesorensen5397
@stinesorensen5397 4 года назад
Very useful demonstration. Thank you for sharing Mike!
@jamescutler428
@jamescutler428 3 года назад
Great video! Very helpful details.
@dobariyahardik3388
@dobariyahardik3388 2 года назад
thank you very much sir ,Your video is very helpful
@md.masumbillah8222
@md.masumbillah8222 2 года назад
Thank you for sharing this
@dipeshsharma7869
@dipeshsharma7869 4 года назад
Wonderful video..thank you for uploading !!
@konradhryniewicz7388
@konradhryniewicz7388 3 года назад
Nice video :))) thanks!
@mikecrowson2462
@mikecrowson2462 3 года назад
You are very welcome!
@saeidnosrati3782
@saeidnosrati3782 2 года назад
Hi Mike, thank you for sharing this fantastic video. As a Ph.D. student in the field of management, I want to run a conceptual model with multilevel regression, however, I can not. would it be possible to share us a video in which a conceptual model is being run?
@itofernando1379
@itofernando1379 3 года назад
One question please, after generating some models, How we choose the best model to be written in the report? Thank you.
@yutingcui2485
@yutingcui2485 2 года назад
Hi Mike, thank you for your video, it makes it clear to understand lem4 package. I want to know whether there is a function to calculate the proportion of variance in lem4. It is complex to manually get R2 by comparing different models.
@amanrastogi5184
@amanrastogi5184 4 года назад
Sir, Can you make a video on Multivariate Multilevel Modelling (theory + practical) ? it will be very helpful of you, Thank You.
@mikecrowson2462
@mikecrowson2462 4 года назад
Hi Aman, I'll put this on my "to-do" list. I think I'll probably be doing something on this sometime in the near future. Best wishes!
@amanrastogi5184
@amanrastogi5184 4 года назад
Thank you, Sir.
@fangjingtu5840
@fangjingtu5840 3 года назад
Hi Mike, thanks much for the informative video! I encountered the following error with the graph_model: ""Error in factor(grid[[term]], labels = c("-1 SD", "+1 SD")):invalid 'labels'; length 2 should be 1 or 0". My y and x are both continuous variables, and the moderator is a factor. Do you have suggestions to fix this?
@hakeemojulari7392
@hakeemojulari7392 2 года назад
@Mike Crowson, How do I use lme4 for categorical data (both predictors and response variable) and the data contains datetime
@tayebehsaghapour6505
@tayebehsaghapour6505 2 года назад
Hi Mike, thanks so much for the very useful video on multilevel modelling. I am trying to run a multilevel nested logit model, just wondering if you are aware of any R packages that can be used for this modelling? most packages I know haven't gone beyond the multinomial logistic model; however, in nested logit, the outcome measure itself has a hierarchical structure which makes the model even more complicated. I appreciate your advice on this. Thanks
@daqingliu7082
@daqingliu7082 4 года назад
Thanks for making this very useful video! I had a problem when using reghelper::graph_model. My model has two categorical variables (a and b) as predictors and one continuous covariate (c): m1
@saeidnosrati3782
@saeidnosrati3782 2 года назад
Would you please tell us how we can get model fit indices and standardized estimation in this video?
@julieyananzhu1134
@julieyananzhu1134 4 года назад
Thanks for sharing! It's very informative! Just a minor suggestion, 1+(1|x) actually can be simplified as (1|x), right? I read from lme4::lmer R help file, Table2.
@mikecrowson2462
@mikecrowson2462 4 года назад
Yes you are right. I presented as my way for pedagogical purposes. Cheers!
@reaperqnu
@reaperqnu 3 года назад
Is the extraversion a binary variable? If so, we can interpret the intercept as the level of popularly of an introvert male, is this correct? The coefficients of the sex and extra variables are in fact the differential effect from this referencing type.
@junli7200
@junli7200 3 года назад
Hi Mike, thank you for sharing this. I am struggling with a longitudinal multilevel model with the count (slightly over dispersion with c=1.78) as the dependent variable. How can I do this in R ?
@wasafisafi612
@wasafisafi612 Год назад
You can use the "quasipoisson" as the family or the negative binomial model
@danielmax562
@danielmax562 Год назад
It seems confusing to me cause we have Level 1 and Level 2 variables but in the models in R they are all put together, side by side, without distinction. How does the model "know" that they belong to different levels?
@nafisanwari6288
@nafisanwari6288 Год назад
I think the value of level 2 variables stay the same within a particular group, but varies with other groups. See the data structure posted at the beginning of the video
@spiousas
@spiousas 4 года назад
Is there a way to use the graph_model for three-way interactions?
@benabdallahnadia1014
@benabdallahnadia1014 3 года назад
thanks very much for this video. is-it a cross-section analysis? can we extend this model to panel data model??
@mikecrowson2462
@mikecrowson2462 3 года назад
Hi there. This example assumes cross-sectional data. However, yes, you can extend this to panel data (e.g., rpsychologist.com/r-guide-longitudinal-lme-lmer). That said, I don't believe you can model more complex level 1 error structures (e.g., autoregressive) using lmer (as you can do in other programs). Cheers!
@benabdallahnadia1014
@benabdallahnadia1014 3 года назад
@@mikecrowson2462 thank you very much...
@GOGSA007
@GOGSA007 4 года назад
Why are the standard errors for the variance for the intercept-only model different than those given in the book? I have also tried to replicate this example and I am getting the same results as yours, however, in the book this seems not to be the case. P.S. I have also tried to replicate the 3-level example and I have the same problem. However, the fixed effect coefficients and standard errors are like those in the book for both the 2- and 3-level models.
@mikecrowson2462
@mikecrowson2462 4 года назад
Hi Georgi, thanks for your question. In the preface that most of the analyses carried out in the text are done using HLM (the program by Scientific Software International) - with some SEM-based approaches using MPlus. Sometimes, there are differences between programs in certain defaults (e.g., in terms of test statistics reported, such as z-test versus t-test of fixed effects) and even approaches to estimating standard errors (based on raw residuals, Pearson residuals, normalized residuals; use of robust standard errors versus no). I'll be honest, I haven't spent much time unpacking the differences between HLM and the lme4 package, but it looks like HLM uses Robust standard errors (see stat.utexas.edu/images/SSC/Site/M_HLM_Tutorialv2.pdf) by default, whereas this does not seem to be the case with 'lme4' (at least I have not found any discussion of robust standard errors in the documentation: cran.r-project.org/web/packages/lme4/lme4.pdf or cran.r-project.org/web/packages/robustlmm/vignettes/rlmer.pdf). This is further supported by a post here arxiv.org/abs/1612.04911 and article here (www.jstatsoft.org/index.php/jss/article/view/v087c01/v87c01.pdf) where the authors review their strategy for obtaining these standard errors when using lme4. Hope this helps!
@GOGSA007
@GOGSA007 4 года назад
@@mikecrowson2462 Thank you for the prompt response! This could indeed be the case so I will have a look at the sources you provided (just to let you know the first link you provided requires permission to access the site). It is slightly disturbing, though, because in Hox's analysis in the book the variances are statistically significant, while when you perform the analysis with the lme4 package, they are not. I will look into that and if something comes up I will give you a shout here. Thanks again and keep up with the nice work you're sharing with us!
@amanrastogi5184
@amanrastogi5184 4 года назад
Can we include the random slope of 2nd level predictor in a 2 level model? and if yes, then what will this mean? and if not then where am i going wrong? Thank You.
@mikecrowson2462
@mikecrowson2462 4 года назад
Hi Aman, in general, the more complex your model becomes, the more likely you might run into problems with model convergence (that is because you are estimating additional parameters; by the way, if you specify an unstructured matrix, then it's even more complex as you will have variances and covariances among all randomly varying intercepts and slopes). But apart from this kind of issue there is no prohibition against specifying more than a single slope as randomly varying. Cheers!
@amanrastogi5184
@amanrastogi5184 4 года назад
@@mikecrowson2462 thank you Sir.
@amanrastogi5184
@amanrastogi5184 4 года назад
@@mikecrowson2462 But the question stands that if i include a random slope of top level predictor then will than mean to a lower level outcome variable.?
@guani2155
@guani2155 4 года назад
Hi Mike, I had a problem when running the the fist function str(hox2010ch2).Here is the code and the error information: > str(hox2010ch2) 'data.frame': 2000 obs. of 12 variables: Error in nchar(x, type = "w", allowNA = TRUE) : invalid multibyte string, element 1 Could you please tell me what's wrong with it?
@guani2155
@guani2155 4 года назад
I'm running it in RStudio, it shows the error information. But I tried it in R then I can see the structure of the data
@daviddearlove
@daviddearlove 3 года назад
@@guani2155 ditto. did you do the rest in r vs. r studio?
@guani2155
@guani2155 3 года назад
@@daviddearlove Hi David, I was using R studio
Далее
Multilevel models in R
21:34
Просмотров 17 тыс.
(Simplified) Linear Mixed Model in R with lme()
26:17
Fitting mixed models in R (with lme4)
15:38
Просмотров 26 тыс.
R - Multilevel Models Lecture (Updated)
56:09
Просмотров 46 тыс.
Principal components analysis in R
26:49
Просмотров 157 тыс.
Multilevel modeling using SPSS (July, 2019)
10:27
Просмотров 51 тыс.
Multilevel models
1:01:02
Просмотров 24 тыс.