Multilevel modeling and post-hoc analysis

Discuss statistics related things
Post Reply
jessicalomw
Posts: 3
Joined: Fri Apr 08, 2022 8:57 am

Multilevel modeling and post-hoc analysis

Post by jessicalomw »

Hi everyone!

I am new to multilevel modeling and jamovi. :grin:

I've come up with the following questions when doing the MLM with the "Mixed Model" module:
1. When I was performing the Bonferroni post-hoc tests for one of the between-group independent variables, I noticed there was a shrinkage in the values of AIC, BIC, Loglikel. and fixed effects estimates. May I know if there are ways for me to visualize/compute the between-group differences in the dependent variable, without shrinking the model estimates?
2. I found that some of the variable names became garbled in the output. Is there any way to fix this?

Thanks a lot! :blush:
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Multilevel modeling and post-hoc analysis

Post by mcfanda@gmail.com »

Hi
the first issue is surprising because estimating the posthoc does not affect the model estimation at all, so you should not see any difference in the model results whether you ask for the posthoc tests or not. If you, however, are comparing two models with and without a between-group variable, the change in the estimates depends on your data, but generally speaking, you should expectt a change in AIC, BIG, and estimates.

Variables names may get garbled in previous versions when the model did not coverged. Are you on the latest version of GAMLJ? (version 2.6.4)

If you share a .omv file where the issue is present, we can help you in resolving the issues
jessicalomw
Posts: 3
Joined: Fri Apr 08, 2022 8:57 am

Re: Multilevel modeling and post-hoc analysis

Post by jessicalomw »

mcfanda@gmail.com wrote:Hi
the first issue is surprising because estimating the posthoc does not affect the model estimation at all, so you should not see any difference in the model results whether you ask for the posthoc tests or not. If you, however, are comparing two models with and without a between-group variable, the change in the estimates depends on your data, but generally speaking, you should expectt a change in AIC, BIG, and estimates.

Variables names may get garbled in previous versions when the model did not coverged. Are you on the latest version of GAMLJ? (version 2.6.4)

If you share a .omv file where the issue is present, we can help you in resolving the issues
Hi. Thank you for your sugesstion. I have attached the .omv file for your review, and I am using GAMLJ version 2.6.3.

The garbled variable name issue was present when I dragged "Group" into "Covariates" instead of "Factors".

I aimed to use MLM to determine (1) whether CC (CC_t-1) can be predicted by CC at the previous timepoint (CC_t-1); (2) whether the autocorrelation differed among the three groups. I have then set up three MLM models: (1) Intercept only model; (2) Random intercept model with L1 predictor (CC_t-1); and (3) Random intercept model with L2 predictor (Group). However, I found the fixed effects of "Group" was split into Group 1 and Group 2 when "Group" was dragged into "Factors". I wonder if I have set up the right models and how I should interpret the output.

Thank you!
Attachments
Demo.omv
(108.8 KiB) Downloaded 118 times
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Multilevel modeling and post-hoc analysis

Post by mcfanda@gmail.com »

Hi,
there are issues with your analysis, but let me first solve the problem of the garbled names. You defined group as a nominal variable but then you put it in the model as a continuous variable (covariate). That creates the name mis-encoding. If you really want to consider `group` as a continuous variable (but see below) set it a "Continuous" in the datasheet tab, and you get the results.

However, group is a categorical variable, so it must go into `factors`. Being three groups, the effect is estimated using two dummy contrasts. This is the way (any) linear model treats categorical variables (you get the same in any software you may use). In fact, a categorical variable effect is evaluated as a whole by looking at the Omnibus tests (the F-tests), but it is estimated with contrasts dummy variables.

If you use `group` as continuous (putting it in covariates), you are setting your model in a way that group 1 is one unit less than group 2, which is one unit less than group 3. Would you make sense in your data this interpretation? (I guess not)

So, the correct model is the one you estimated with group as a factor (and the variable set as nominal)
jessicalomw
Posts: 3
Joined: Fri Apr 08, 2022 8:57 am

Re: Multilevel modeling and post-hoc analysis

Post by jessicalomw »

mcfanda@gmail.com wrote:Hi,
there are issues with your analysis, but let me first solve the problem of the garbled names. You defined group as a nominal variable but then you put it in the model as a continuous variable (covariate). That creates the name mis-encoding. If you really want to consider `group` as a continuous variable (but see below) set it a "Continuous" in the datasheet tab, and you get the results.

However, group is a categorical variable, so it must go into `factors`. Being three groups, the effect is estimated using two dummy contrasts. This is the way (any) linear model treats categorical variables (you get the same in any software you may use). In fact, a categorical variable effect is evaluated as a whole by looking at the Omnibus tests (the F-tests), but it is estimated with contrasts dummy variables.

If you use `group` as continuous (putting it in covariates), you are setting your model in a way that group 1 is one unit less than group 2, which is one unit less than group 3. Would you make sense in your data this interpretation? (I guess not)

So, the correct model is the one you estimated with group as a factor (and the variable set as nominal)
Hi,
Thank you very much for your detailed reply. My issues are all fixed now! :relaxed:
Post Reply