Announcement

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

  • mixed with 2 time points

    Hi,

    I am trying to build a random intercept/random slope model with longitudinal data (time is nested within individual). The outcome is continuous, so I use mixed command. The problem is that there are only two time points (pre and post). If I had more time points, like 4 time points (e.g., week 1-4), slope makes sense to me, but I am not sure if random “slope” makes sense in my case since time variable is binary (1/0).

    Let’s say that Y is the outcome, X is the treatment (control (0) vs. treatment (1)), and T is the time variable (1 for post and 0 for pre). Here is my syntax.
    Code:
    mixed Y i.T##X || id: T, var cov(un)
    I searched for the answer on google, and somebody suggested the same code with “noconstant” option.
    Code:
    mixed Y i.T##X || id: T, var cov(un) noconstant
    First, I am not sure which one is right.
    Second, I am curious if the random slope model can be used when I have a binary time variable.

    Please advise!
    Thank you.

  • #2
    Yes, you can use a model with random slope, and you don't have to specify the -noconstant- option (and should not unless the science of your project supports constraining the constant to zero.)

    I will say this: with a treatment variable, and a treatment#time interaction, random slopes and intercepts, and unstructured covariance, you are asking your data to estimate a large number of parameters. If you have a sufficiently large data set, things will probably work out well. But if your data set is modest, you may find that all of these parameter estimates come out with very wide confidence intervals, or even that the model fails to converge due to inability to identify them all. If that happens, and if getting more data is not an option, simplify your model by removing the least important parameters. (Probably you will never use all those covariance parameter results anyway, so getting -cov(un)- is likely a waste of time and effort. Do you really need the random slopes? How will you make use of the slope-variance?)

    As for your question which model is right, I can assure you that no model is right. I suspect that the one with the noconstant constraint is an utter mis-specification of the real world data generating process, so it is probably wrong in a serious way. But ultimately, our models are almost never really right: at most we can hope they are useful. (Hat tip to Box, of course.)

    Comment


    • #3
      Without a random slope, it works well. With all those requested parameter estimations, however, it did not converge, and I indeed have a small sample. I simply wanted to try all and cut back from there though I knew it is usually the other way around One reason I wanted to try a random slope model is that the multilevel model for other outcomes has a random slope (there are 5 time points, so estimating a linear trajectory over time). I wanted to be consistent.

      Thank you so much for your insight. I really appreciate it.

      Comment

      Working...
      X