Announcement

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

  • Repeated measures analysis.

    Hello.

    I was hoping I could get some advice with how to think about a question.

    I'm interested in the effect of drug x on the continuous variable y.
    y is measured in 10,000 patients before drug x is given and then at random time points over a 24 hour period after receiving drug x.
    I want to set up a model to help estimate the effect of drug x on y over the 24 hour period.
    I would like to control for demographic variable - age, sex, and race.
    Eventually I would like to add to the model three different doses of drug x - to determine if higher doses are associated with a bigger change in y.

    I'm comfortable with the concepts of linear regression and performing this in stata.
    Doing some research, because of the repeated measure in my dataset, is a mixed linear model what I need to use? Or am I thinking about this incorrectly. Any advice or resources you point me to would be appreciated.

    Best.

  • #2
    Well, because of the repeated measures, it would be wrong to use -regress-, because -regress- requires independence of observations. So -mixed- would be one solution. Since you only have two levels in this model: repeated measures nested within patients, you might prefer to use -xtreg, re-, which is somewhat simpler to use and estimates the same model as -mixed- when there are only two levels. Don't forget to use factor variable notation in your command (-help fvvarlist- if you don't know about this) so that you will be able to use -margins- afterward.

    However, if the time points are really "random," or at least "haphazard" as opposed to systematic, you might want to represent time as continuous variable in your model. And then you need to think about the form of the relationship between outcome y and time. It is likely non-linear and some appropriate functional transformation will be required. The same consideration will apply to dose when you introduce it.

    Comment


    • #3
      There is work on this kind of data set in the statin EMR literature. Because dose response is typically nonlinear (sigmoidal), and you have multiple responses per person, you will need a mixed model that allows a nonlinear mean response function...another possibility is to collect person level nonlinear curve statistics via -nl- and then work with those in a GLM...

      Comment


      • #4
        Ahh... thank you for your help. Now to learn more about non-linear and mixed models.
        Do you have any examples or resources you can refer to regarding the statin analysis using EMR data?

        Comment


        • #5
          If you don't know the functional form of the waxing and waning drug effect, then consider generating splines (restricted cubic splines or B splines) for the time course, using indicator variables for the dose level, and fitting a linear mixed model that includes spline variable × dose level interaction terms.
          Code:
          help mkspline
          search bspline

          Comment


          • #6
            Here are a couple reviews:

            https://www.ncbi.nlm.nih.gov/pubmed/21248726
            https://www.ncbi.nlm.nih.gov/pubmed/26667791

            and an example:

            https://www.ncbi.nlm.nih.gov/pubmed/24096969
            https://www.ncbi.nlm.nih.gov/pubmed/18834356

            which references the use of R and SAS NLMIXED for the EMR data extracted by NLP, but they also use nl dose models per person to extract curve parameters to further associate with genetic data (SNPs).



            Comment


            • #7
              Also beware of the distinction between pharmacokinetic (PK) and pharmacodynamic (PD) models, with regard to what the body does to the drug vs what the drug does to the body.

              Comment

              Working...
              X