[R] Model within subjects treatment variable and multiple measurements per treatment: is this the correct model?
bgunter.4567 at gmail.com
Fri Oct 13 21:39:57 CEST 2017
Post on r-sig-mixed-models, not here. In PLAIN TEXT NOT HTML.
On Oct 13, 2017 10:55 AM, "Nynke l" <lauranynkevanderlaan at hotmail.com>
> 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!
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help