Announcement

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

  • lincom and interactions with continuous covariates

    Hi everyone,

    I'm performing a linear mixed model as follow:

    xtmixed A_SCMMSE i.tertile_map_bl##c.visite A_AGE sexe || ctrpat :

    A_SCMMSE is a cognitive performance score
    tertile_map_bl is a variable representing tertiles of mean blood pressure at baseline
    visite is my continuous time variable (visite=0 or 2 or 4 or 6) (number of the visit)
    then age and sex

    I would like to predict the difference of cognitive performances between patients in the first tertile and patients in the second one, at different time points.

    I have some trouble to write the lincoms with a continuous covariate. I had worked in the past with time as a qualitative variable and things were pretty much easier for me.

    I had typed for example :

    lincom 3.tertile_map_bl+3.tertile_map_bl#4.visit-1.tertile_map_bl-1.tertile_map_bl#4.visit

    but my model was considering visit as a qualitative variable xi:... i.visite

    Could you please help me?

    Thank you so much in advance for your valuable help,

    Best

    Pierre

  • #2
    Well, the -lincom- approach is suboptimal in any case because, implicitly, it sets age and sex to default values of zero, rather than adjusting to their distributions in the data. It is also more complicated.

    I also don't understand why you have visite as a continuous variable. Your model implies that there is a straight line trend on cognitive performance over time. Is that really what you want? For now, I'll assume it is.

    Code:
    margins tertile_map, at(visite = (0 2 4 6))
    will give you the adjusted expected values of A_SCMMSE at each combination of tertile_map and visite. If you want to do tests of hypotheses about the equality of these expected values, you can re-run the -margins- command adding the -pwcompare- option.

    By the way, if you are using Stata version 13 or later, -xtmixed- has been renamed to -mixed-. While Stata still accepts the name -xtmixed-, it is no longer documented and at some future point it may become unrecognized.

    Comment


    • #3
      Thanks Clyde for your help. I used the -pwcompare- option with the suboption -effects-.

      I thought that when I was using the -lincom- command after for example margins tertile_map_bl, atmeans, the results given by the lincom would be the predicted differences adjusted on the mean of all the other covariates in my model. It is the case with the -pwcompare- command but not with the -lincom- command?

      Have a nice day,

      Pierre

      Comment


      • #4
        No, -lincom- does not calculate adjusted differences. It calculates linear combinations of coefficients from the regression. These correspond to differences in expected outcomes conditional on everything else being zero, which is not the same thing.

        Comment


        • #5
          Thank you so much Clyde. I will keep it in mind.

          Pierre.

          Comment

          Working...
          X