I want to do a LMM with paradigm and trait math anxiety and their interaction as fixed effects, random effects for subjects: state_math_anxiety ~ paradigm * trait_math_anxiety_centered + (1|subject)
data type: state math anxiety and trait math anxiety are continuous, i centered trait math anxiety; paradigm is binary with two categories.
I started with lmer function:
mm_start_STAI <- lmer(STAI ~ paradigm * AMAS_centered + (1|subject), dat = data_long, REML = FALSE)
Then using step function to get the final model:
step_lmm_STAI <- step(lmm_start_STAI, ddf = “Satterthwaite”, reduce.fixed=TRUE, reduce.random = TRUE,
alpha.fixed=0.05, alpha.random=0.05)
final_lmm_STAI <- get_model(step_lmm_STAI)
after get the final model(in this case, the final model is same as full model), i used the mixed function, which can tun the dummy coding to effect coding for paradigm
M1 <- mixed(STAI ~ paradigm * AMAS_centered + (1|subject), dat = data_long)
Questions:
- Is there any problems with my above analyzing process?
- There was a little bit significance difference for the results, which one should i sticked to?
- As I know, many functions can only be used for lmer models not for mixed models, e.g., plot function, coef function, tidy function from the broom.mixed packages. Is there any other functions i can used for getting coefficients based on mixed functions?
I am new to LMM and am very confused about how i should report the LMM results.Looking forward to your advices and thanks in advance!
Best,
Olivia
Following i showed two results from the two functions, one is summary for lmer (), the other is summary for mixed function
lmer
mixed
sun Yang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.