Including a covariate

Home forums Mixed Models Including a covariate

This topic contains 0 replies, has 1 voice, and was last updated by  Melvin Sim 2 weeks ago.

  • Author
    Posts
  • #347

    Melvin Sim
    Participant

    Hello, I want to ask how do I include a co-variate in the model when using the aov-car function.
    Below is the syntax I have created, I am running a mixed model with time as a within variable and condition as a between variable:
    fit.grat2 <-aov_car(grat ~ condition*time + Error(PPT/time),
    data=mf_long2,
    covariate=centgrat)

    I have specified that centered trait gratitude (centgrat) is meant to be a covariate. My question is whether I have to include it in the actual model like so instead:
    fit.grat2 <-aov_car(grat ~ tgrat+condition*time + Error(PPT/time),
    data=mf_long2,
    covariate=centgrat)

    • This topic was modified 2 weeks ago by  Melvin Sim. Reason: For clarity

You must be logged in to reply to this topic.

 

Author: Melvin Sim