Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Association between repeated measures dependent variable and repeated measures independent variable

    I want to determine the association between a continous dependent variable measured at 4 time points and a continous independent variable measured acorss 4 timepoints as well. I am quite stuck on how to analyze this.

    I will appreciate all the help. Thank you.

  • #2
    Do you mean that you have a bunch of people (or other units of analysis) who have had both measurements done on four occasions? If so, are you interested in the association within people over time, or the association across people. They aren't necessarily the same (and can even go in opposite directions).

    Comment


    • #3
      Thank you Clyde for your comment. I should have explain the scenario clearly. I have 20 subjects. i want to determine if the ground reaction force (dependent variable) in walking measured at four time points is associated with the bone displacement angle (indepedent variable) measured at 4 time points as well. probably, i am more interested in the association within people over time.

      Comment


      • #4
        So let me assume you have a numeric variable, id, which identifies distinct subjects, a variable ground_reaction_force, a variable bone_displacement_angle, and that there are four distinct observations per subject (possibly containing other variables as well).

        Code:
        xtset id
        xtreg bone_displacement_angle ground_reaction_force, fe
        will give you a within-person regression of bone displacement angle on ground reaction force. The regression coefficient can be understood in the usual way, with the additional understanding that it is the within-person association that is being estimated (because of the -fe- option).

        Notes: if your data is set up with one observation per subject containing four variables for ground reaction force and four more for bone displacement angle, then you need to use the -reshape- command first to create four separate observations per subject.

        If your id variable does not yet exist, create one. If it is a string variable, egen numeric_id = group(id) will create a new numeric id, which you should use instead of id itself in the -xtset- command above.

        Comment


        • #5
          Thank you so much.

          Comment

          Working...
          X