[R-sig-ME] Model within subjects treatment variable and multiple measurements per treatment: is this the correct model?

Nynke l lauranynkevanderlaan at hotmail.com
Fri Oct 13 21:49:51 CEST 2017


Hello all,

I have a question regarding my analysis and how to correctly model this in r syntax.
I have a dataset from an experiment in which each subject received 3 treatments (HealthPrime, HedPrime and NonfPrime; within subjects factor). In each of these treatments, 40 measurements have been done of my DV (choice_topbottom, contineous variable) and two other predictor variables (tastiness_dif_topminbottom and healthiness_dif_topminbottom). In addition, I have a subject level variable (DEBQ_restraint) for which I would like to know if there is an interaction with treatment or the predictor variables.

What I basically want to know is if there is a difference between the treatments in how tastiness_dif_topminbottom and healthiness_dif_topminbottom relate to choice_topbottom. And I would like to know whether this is influenced by DEBQ_restraint.

Is the model below correct to take into account the fact that the treatment is a within subjects factor and that there are multiple measurements per treatment?

fit <- lmer(choice_topbottom ~ tastiness_dif_topminbottom + healthiness_dif_topminbottom + HealthPrime*tastiness_dif_topminbottom + HedPrime*healthiness_dif_topminbottom + HedPrime*tastiness_dif_topminbottom + HealthPrime*healthiness_dif_topminbottom + (1 | pp_code) + DEBQ_restraint + tastiness_dif_topminbottom*DEBQ_restraint + healthiness_dif_topminbottom*DEBQ_restraint + HealthPrime*tastiness_dif_topminbottom*DEBQ_restraint + HedPrime*healthiness_dif_topminbottom*DEBQ_restraint + HedPrime*tastiness_dif_topminbottom*DEBQ_restraint + HealthPrime*healthiness_dif_topminbottom*DEBQ_restraint, data = data)

I hope someone with more experience in these kind of models can let me know whether this is correct.

Many thanks in advance!

Best,
Nynke


	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list