0

we want to analyze a Mixed Linear Model. One of the fixed effects (POSITION) has a z-value of 0 and a p-value of 1, despite it should have a significant effect (a graph shows it and it is correct in substance). Do you know how we can fix that issue? If you need further information/pieces of code, I can upload it.

Thanks in advance!

Sebastian :)

Fixed effects:
                                  Estimate Std. Error z value Pr(>|z|)    
(Intercept)                     -9.877e-01  5.706e-01  -1.731   0.0835 .  
Risikodarstellung                1.336e+00  7.688e-01   1.738   0.0822 .  
Icon                            -7.823e-01  7.719e-01  -1.013   0.3108    


Position                        -2.089e-05  1.178e-01   0.000   0.9999   

 
Risikodarstellung:Icon          -8.132e-02  1.106e+00  -0.074   0.9414    
Risikodarstellung:Position       3.277e-01  1.653e-01   1.983   0.0474 *  
Icon:Position                    8.021e-01  1.777e-01   4.513  6.4e-06 ***
Risikodarstellung:Icon:Position -4.486e-01  2.613e-01  -1.717   0.0860 .  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

This is the code for the model:

#Linear mixed model
daten.long <- daten.long %>%
  mutate(Risikodarstellung = recode(Risikodarstellung, "absolut" = 1, "relativ" = 0))
daten.long <- daten.long %>%
  mutate(Szenario = recode(Szenario, "Szenario1Order" = 1, "Szenario2Order" = 2, "Szenario3Order" = 3, "Szenario4Order" = 4, "Szenario5Order" = 5, "Szenario6Order" = 6))
daten.long <- daten.long %>%
  mutate(Icon = recode(Icon, "nein" = 0, "ja" = 1))
daten.long$Ergebnis <- as.numeric(daten.long$Ergebnis)
options(contrasts = c("contr.sum", "contr.sum"))
cc_full.mod <- glmer(Ergebnis ~ 1 + Risikodarstellung*Icon*Position + (1 |id), data = daten.long, family = binomial,control=glmerControl(optimizer="bobyqa"))
allFit(cc_full.mod) #Da hier der bobyqa-optimizier hier "[OK]" zeigt, haben wir diesen in der oberen Zeile implementiert
summary(cc_full.mod)

We have no clue how this could have happened. The code looks okay and the graph shows the effect of Position...

enter image description here

Gregor Thomas
  • 136,190
  • 20
  • 167
  • 294
seboe
  • 13
  • 3
  • 1
    I'd suggest at least adding the code for your model, `summary(your_data$Position)` so we can see what data is there, and perhaps an image of the graph you mention that makes you think `Position` should be significant. – Gregor Thomas Aug 08 '23 at 20:22
  • I would add that you have significant `Position` effects in several interaction terms: `Risikodarstellung:Position` is significant `Icon:Position` is highly significant, and `Risikodarstellung:Icon:Position` is somewhat significant. So my guess would be you are including `Position` in your model 4 times, so perhaps it is not surprising that one of those times (the main effect) isn't significant. – Gregor Thomas Aug 08 '23 at 20:24
  • We can only guess without your data and your model. Perhaps the interactions explain all the apparent differences, or the random effects are confounding. – Allan Cameron Aug 08 '23 at 20:24
  • 1
    Overall, this seems like a statistical question not a programming question, so I think it is probably a better fit for stats.stackexchange.com – Gregor Thomas Aug 08 '23 at 20:25
  • Okay, thank you. I will ask the question again at stats.stackexchange.com – seboe Aug 08 '23 at 20:31
  • Now that you've asked again there https://stats.stackexchange.com/questions/623539/problems-with-fixed-effects-or-a-mixed-linear-model , please delete this question so it doesn't attract effort here ... – Ben Bolker Aug 08 '23 at 21:10

0 Answers0