Another superb lecture! Sums up 2 weeks of SEM class review. Brilliant!
@StatisticsofDOOM5 жыл бұрын
Thank you!
@leguaani12343 жыл бұрын
This is great! Helped me so much with a project. Thank you very much for contributing.
@StatisticsofDOOM3 жыл бұрын
Thanks for the kind words!
@michalkohut27872 жыл бұрын
Thank you very much! The part with looping of partial invariance really helped as I'm using bifactor model with robust CFI and RMSEA, so the partialInvariance() is no use for me. Lovely lecture!
@StatisticsofDOOM2 жыл бұрын
Glad to have helped!
@angelzamoramartinez98462 жыл бұрын
Gracias, mega útil
@michaelmatta70694 жыл бұрын
That is a great video! Thanks so much for your contribution. Quick question about the possibility to use the eqMI.main function for more than two groups. I tried with three groups, but I got the following message: "Error in (function (...) : projection method only applies to two groups with this function." When I use only two, everything works fine. What would you recommend in this case? Should I run the same procedure for each pair (i.e., 1 vs 2, 2 vs 3, 1 vs 3)?
@StatisticsofDOOM4 жыл бұрын
Hmm good question. I hadn't played with it for more than two groups obviously. That would be my recommendation, as that's what you would have to do anyway to figure out where the invariance is either way.
@alissawie41433 жыл бұрын
Thanks a lot for that great video! I was just wondering if you have any idea how to get the CFI calculated by the WLSMV estimation method in the last partial invariance part where you list the CFIs in a decreasing way? So I am stuck at the line: CFI_list [i]
@StatisticsofDOOM2 жыл бұрын
Oh, I do not. I would recommend probably calculating it manually - the formula is in the notes for the lecture video (check out the fit indices video here statisticsofdoom.com/page/structural-equation-modeling/).
@timgehrmann79332 жыл бұрын
Thanks for the video! It saved my life (or at least thesis) so far... I wonder if you know of any way to persuade R into equivalence testing with robust chi square values after WLSMV estimation? Thank you in advance :)
@StatisticsofDOOM2 жыл бұрын
... not sure honestly. I thought the X2 provided was always the robust one. Maybe check the lavaan help pages lavaan.ugent.be/
@jfc_mx46973 жыл бұрын
Hi Dr. Buchanan, I am wondering how I would go about controlling for variances of other variables before fitting the models. Do you have any recommendations? Furthermore, I am wondering how this invariance test can be conducted for second order factor structures. I have searched the web vigorously for information. I figured my best bet was to ask you. (:
@StatisticsofDOOM3 жыл бұрын
You would need to custom program a model that includes the other variables but does not automatically test them. I would recommend checking out the guide on lavaan's website to determine how to write the model structure for only the specific paths you are interested in testing. The Beaujean and Brown books both cover higher order structure tests.
@annawhitehouse97623 жыл бұрын
Hi Dr. Erin! Great video! I'm trying to follow along with some of my own data, but have not been successful in running the eqMI.main function. I get this error: Error in as.character.default(x) : no method for coercing this S4 class to a vector. I have tried changing my group variable to a factor with different levels, but the same error popped up. Do you have any suggestions?
@StatisticsofDOOM3 жыл бұрын
Yes! I have a new video that I need to make visible that does not use this package because it seems to have a new error every week!
@annawhitehouse97623 жыл бұрын
@@StatisticsofDOOM that’s great to hear! Thanks for your quick reply :)
@stanciuadrian98273 жыл бұрын
So helpful! Thank you for this clear guide. Re 2021 status: Are the packages here in use still valid or any of them are or will be depracated soon?
@StatisticsofDOOM3 жыл бұрын
I know people have had a lot of issues with equal test MI. It is still out there, but I know I get emails about it not working (unclear if it's user error or package issues). I just posted an update that shows you how to do MG totally in lavaan if you can't get this one to work. kzbin.info/www/bejne/d4i1iHZ9l7p4oLc
@zahid16093 жыл бұрын
Thank you very much. This helped me a lot. You have explained the partial invariance of residuals. I am very new in learning R. Would you please share the syntax of partial invariance for metric and scaler ? or what change I should do in the syntax of partial invariance of residuals to get it for metric and scaler? I tried by using "=~" & "~1" but it returned constant values 😞
@StatisticsofDOOM3 жыл бұрын
Check out the 2020 update for examples: statisticsofdoom.com/page/structural-equation-modeling/
@orlandosabogal61034 жыл бұрын
Nice video! thank you very much. Can you paste here the link to te videos you mention at the beggining of the talk? (the links seems not to be working anymore)
@StatisticsofDOOM4 жыл бұрын
I am working on the website now, been some issues with the provider. You can find the MGCFA videos here for now: kzbin.info/door/MdihazndR0f9XBoSXWqnYgsearch?view_as=subscriber&query=multigroup+cfa
@NormanMendoza04213 жыл бұрын
Hi Dr. Erin! Thank you so much for this helpful lecture. If the model was invariant until scalar, what does this mean? I’m testing the MI of a scale for paper-and-pen method vs online.
@StatisticsofDOOM3 жыл бұрын
That means it’s all the same up to the scalar step. So there’s probably a difference in the intercepts between the groups.
@medinachely3 жыл бұрын
Can I follow this procedure for a SEM (structural model)?
@StatisticsofDOOM3 жыл бұрын
Yep! Check out the full set of different options at: lavaan.ugent.be/tutorial/groups.html
@jykeem54543 жыл бұрын
Thanks for sharing brilliant lecture :) your lectures have been very helpful for starting my career as a scientist. Just have one question tho. I am trying to do invariance testing of hirarchical model. When i typed in eqmi.main code and a warning appeared that says “[.data.frame’(dotdotdot$data, , c(useVar, dotdotdot$group)) : undefined columns selected.” When i ran eqmi.main for overall factor (non-hierarchical) model, such warning did not appear. Data sets for each model are the same. Could you kindly explain why am i having this problem?
@StatisticsofDOOM3 жыл бұрын
Literally don’t know what causes this error - you aren’t the first one to see it. I have some newer examples on the channel that show how to do the test manually so you don’t have to use this package.
@samanthadouglas27264 жыл бұрын
Hi! Do you know how eqMI.main handles missing data? I can't seem to find documentation on it, and keep getting an error (Error in (function (..., lamb0 = NULL) : Check missing data in raw data or NAs in the sample covariances). When I add in the argument missing = TRUE it does not seem to work either. When I test the overall model with CFA I do not get this error.
@StatisticsofDOOM4 жыл бұрын
I don't think it does - you have to have a model without missing data. I seem to remember this from testing it myself for a project, but the documentation should say. cran.r-project.org/web/packages/equaltestMI/equaltestMI.pdf
@vania73022 жыл бұрын
This was brilliant and so helpful to finally make a break testing for invariance in my CFA. Thank you so much! I do have a question as to whether the eqMI.main function can also be used to test for multigroup path analysis, and if the steps would be the same. I have tried dipping my toes but I keep getting an error that I have missing data (even though I already made sure to filter that).
@StatisticsofDOOM2 жыл бұрын
I've had a lot of problems with that package and actually recommend just doing it manually now (I have updates to this video). And yes, you could do it with path analysis as well.
@vania73022 жыл бұрын
@@StatisticsofDOOMoh I'll definitely check the updated videos then! Thanks so much for pointing me to them!
@NormanMendoza04214 жыл бұрын
Hi Dr. Erin, (this might be a naive question but) I want to ask what names should I include in the code below, to also include chi pvalue, and upper and lower limit of 90% CFI in the table? Thanks heaps! table_fit[1, ]
@StatisticsofDOOM4 жыл бұрын
The p value is just "pvalue" (you can run fitmeasures(fit.MHQ) to see everything available). The only CI provided is RMSEA, so you'd have to calculate how to do the CI on CFI yourself. I actually haven't ever tried that, but this article may have some help: www.tandfonline.com/doi/abs/10.1080/10705511.2018.1562351?journalCode=hsem20
@shaman143024 жыл бұрын
Hello Dr. Buchanan! when fitting the model for measurement invariance in lavaan, is it possible to correlate error terms on specific groups (e.g. Item1 ~~ Item2 on group 2 only, not the whole model)? Thank you!
@StatisticsofDOOM4 жыл бұрын
Yes - I would tell you to check out the section on the lavaan page: lavaan.ugent.be/tutorial/groups.html that says fix the parameters in some groups but not all. You'd do something like Item1 ~~ c(0, NA)*Item2 so the first group is not estimated (it's zero), and the second group is estimated.
@shaman143024 жыл бұрын
@@StatisticsofDOOM Thank you very much!!!
@yuliaegorova5894 жыл бұрын
If i find that my model is nit invariant at scalar model stage, do I stop there ( do partial invar test) or I still need to continue to run strict (error invariance)?
@StatisticsofDOOM4 жыл бұрын
I would use partial invariance to figure out which items were the non-invariant ones.
@chellymaes56574 жыл бұрын
Thanks for the video! When running eqMI.main, I get the following error : Error in if (max(abs(dtheta)) > ep) break : missing value where TRUE/FALSE needed. I checked whether there were any missing values in my group variable but no missing values are found. Do you know what this error might mean?
@StatisticsofDOOM4 жыл бұрын
You know, someone else asked this question, and I'm not sure we ever figured it out. What's the entire eq command you are trying?
@chellymaes56574 жыл бұрын
@@StatisticsofDOOM I checked the data again and there appeared to be a missing value in one of my items of my subscale. So now everything is resolved but I'm having trouble with my partial invariance testing: I want to test partial invariance for my scalar invariance model, but if I run the code, the values in my CFI list are the same for every item: acc1 ~1 acc1 acc2 ~1 acc2 acc3 ~1 acc3 acc4 ~1 acc4 acc6 ~1 acc6 ..... until my 17th item. 0.9488962 0.9488962 0.9488962 0.9488962 0.9488962 I don't know if I did something wrong in my code? Or does this mean that partial invariance does not improve my model? Thank you for looking at my question!
@StatisticsofDOOM4 жыл бұрын
@@chellymaes5657 That usually means that it doesn't improve the model by relaxing that constraint. Are the other values changing at all?
@chellymaes56574 жыл бұрын
@@StatisticsofDOOM Yes they were, I found my items by which relaxing the constraint improved the model! Thank you for your fast response :) !
@TeckEnigm4 жыл бұрын
Thanks for the video! When running eqMI.main I get the following error that I can't solve, unfortunately: Error in `[.data.frame`(dotdotdot$data, , c(useVar, dotdotdot$group)) : undefined columns selected While when running eqMI.projection I get another error: Error in FUN(X[[i]], ...) : 'x' has to be numeric
@StatisticsofDOOM4 жыл бұрын
Have you checked that the group variable is in the dataframe?
@TeckEnigm4 жыл бұрын
@@StatisticsofDOOM yes, it is in the data frame. I don't get the error when running cfa or sem
@StatisticsofDOOM4 жыл бұрын
@@TeckEnigm Dug through the code, could be an error in a few place. Can you paste the entire eqMI command?
@BloopyBlobBob4 жыл бұрын
Hi, what does it mean when the unstandardised indicator intercept estimates are higher in one group for each item, but the standardised estimates vary? Items on a depression scale for instance, male vs. female samples.
@StatisticsofDOOM4 жыл бұрын
Vary how? (like they are smaller instead of larger?)
@BloopyBlobBob4 жыл бұрын
Statistics of DOOM some are slightly smaller, some are slightly larger. But unstandardised are all larger in the male group, compared with the female group.
@BloopyBlobBob4 жыл бұрын
A follow up question, if i have this configural model > iq =~ i1 + i2 + i3, + i4 and then I add + i2 ~~ c(NA,0)*i4 to it, does this second line free up the constraints on the residual covariance between i2 and i4 in the male sample, and fixes it to 0 in the female sample (if group 1 = male, group 2 = female)? Is this considered partial invariance? And in plain terms, if doing this does not result in a significantly poorer fit, does it mean that items 2 and 4 are somehow correlated for men, but not women?
@StatisticsofDOOM4 жыл бұрын
@@BloopyBlobBob I think that should be correct yes.
@StatisticsofDOOM4 жыл бұрын
@@BloopyBlobBob Then I would interpret the pattern of the data that X is larger than Y, etc.
@jfc_mx46974 жыл бұрын
First and foremost, i am running version 3.6.3 of R, using R studio interface and using a Windows 10 operating system. When i run the code chunk for ## create a picture, i get the following error: "Error: package or namespace load failed for 'semPlot' in loadNamespace(i, c(lib.loc,libpath()), versionCheck =vI[[i]]:there is no package called igraph". I don't think the package igraph is available for the version of R i am using, 3.6.3. Is there a way i can fix this error and still use the semPlot package? if not, is there another package i can use to create a similar picture? if so, can you tell me which package? can you also provide the code for the picture? In any case, i love your youtube videos. They are very informative. :)
@StatisticsofDOOM4 жыл бұрын
Thanks! Try installing the igraph package directly, install.packages("igraph")...I have 3.6.3, and it's available for me to download. That should solve your problem.
@jfc_mx46974 жыл бұрын
@@StatisticsofDOOM Thanks :) installing igraph directly solved it.