Open yutong010 opened 1 year ago
lmer does not make a decision about degree of freedom. There are debates around this issue. Thus, we recommend you making a decision about your degree of freedom and then call pkonfound to make the calculation. Hope this helps!
Thanks for the quick reply! Got it. Btw, I am confused if the RIR is applied to only the significant effects. In other words, if an estimate of my focal independent variable (i.e., X1) is statistically insignificant (p>0.1), indicating that I don't find a significant effect of X1 on Y, does applying the RIR framework to this null effect make sense?
RIR works for results that are not statistically significant as well as for results that are statistically significant. If the result is not statistically significant, we imagine that your observed data is a mixture of cases for which there is zero effect and others for which the effect is at the threshold of significance. RIR then reports what this mixture must be such that if the zero effect cases were replaced with cases that were just significant the final estimate would be just significant. For example: "The estimate would be statistically significant (p=.05) if you replaced XX% of the cases for which the effect was zero with cases for which the effect was exactly at the threshold of significance."
I estimate a mixed effects model in R with the scripts below: if (requireNamespace("lme4")) { library(lme4) m1 <- fm1 <-lmer(dv~ 1 + x1+ x2+ x3+ x4+ x5+(1|u_id), data) konfound(m1, x1) } But got an error: Error in konfound(m1, x1) : konfound() is currently implemented for models estimated with lm(), glm(), and lme4::lmer(); consider using pkonfound() instead
Not sure whether konfound support lmer or not? Thanks.