0

Fairly new to R, I'm wondering whether I am setting my linear mixed model up correctly.

My outcome DV is score, and my fixed effect is intervention (placebo + treatment) and time(pre + post). The participant repeats the questionnaire on 2 occasions, 4 weeks apart (pre, post). When using the melt function if treating as 'repeated measures' so the long format treats subject on 2 rows instead of 1, the collapsed score for outcome includes the pre score too which is not really of interest. I am wondering if the data should be analysed in wide format as technically its only 1 outcome variable (post, and not a repeated measure in this case), which means the pre score would be treated as the 'time' fixed effect only, and not taking into account time 2 (i.e. post). When setting up in SPSS I have got used to putting the data into a long format where time is indexed pre and post, and score (outcome) is both pre+post combined.. but think a different approach may be suitable for R? If taking the latter approach I wonder if this will mess up the non-independence assumption where R doesn't know if a subject repeated the condition twice.

An e.g. of my full model Model <- lmer(outcome ~ treatment + time + treatmentintervention + (timeintervention | subject), data=df, REML=F)

After running the model accounting for random intercept & random slopes, the model not only failed to converge but also residuals looked like there was something in the data not accounted for... not sure if this has anything to do with data set up in the first place?

Any suggestions? Thanks in advance! :)

0 Answers0