Announcement

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

  • mixed effect model and linear trend in effect

    Hello,

    My project is looking at factors associated with the slope in a repeatedly measured outcome. I used a mixed effect model with random slope. To specify that I wanted to look at factors associated with the outcome's slope, I created new variables using gen var_time= var*time for each factor (e.g. bmicat_time below). I coded the following which looks at whether BMI category influences the slope of the outcome:

    xtmixed outcomevar bmicat_time time|| id: time

    But I only get one estimate despite there being 4 categories of BMI. This is assuming linear trend of effect on the slope of outcomevar across BMI categories. I prefer this but my supervisor doesn't like it. Using i.bmicat_time gives me 30 estimates (i.e. 30 parameters) which I do not want. Is there a way to get 3 estimates which compare the slope of outcomevar in BMI categories 2, 3 and 4 with the slope of outcomevar in category 1.




  • #2
    Code:
    mixed outcomevar i.bmicat##c.time || id: time

    Comment


    • #3
      Okay, thank you, Joseph!

      Comment

      Working...
      X