Announcement

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

  • Mix Model ¿?

    Hello everyone. First of all, thank you very much.

    I have some data of repeated measurements of a continuous variable, "results of an eye retina test." The patients are not uniformly followed up. There are different time intervals between measurements. I tried to standardize the time intervals by removing observations and patients so that all patients were measured simultaneously. My question is: Is there a way to handle this data with a mixed model of repeated measures without losing measurements or patients and using all the data?
    Thank you very much!


    Stata 15.1


    clear
    input double id long date_oct double(value_oct treatment) float time_at_first
    120299 20860 62.42411402851987 1 0
    120299 20971 62.07043632864156 1 111
    120299 21083 64.3693413778505 1 223
    120299 21270 64.3693413778505 1 410
    120299 21594 64.3693413778505 1 734
    405325 21172 75.86386662389523 0 0
    405325 21271 73.9186392745646 0 99
    405325 21336 74.80283352426034 0 164
    405325 21585 74.27231697444289 0 413
    405325 21684 76.04070547383438 0 512
    405325 21790 76.74806087359099 0 618
    405325 22404 76.3943831737127 0 1232
    405325 22777 76.0407054738344 0 1605
    569538 21405 67.37560182681605 1 0
    569538 21594 67.02192412693776 1 189
    569538 21790 67.02192412693776 1 385
    569538 21959 66.31456872718115 1 554
    569538 22327 66.13772987724201 1 922
    10479701 22056 66.31456872718115 1 0
    10479701 22494 66.8450852769986 1 438
    10551568 21945 62.070436328641556 0 0
    10551568 22064 61.893597478702404 0 119
    10551568 22131 61.18624207894582 0 186
    10551568 22364 61.89359747870241 0 419
    10552683 21952 69.49766802608585 1 0
    10552683 22719 68.43663492645095 1 767
    10552683 23128 68.61347377639011 1 1176
    10630754 21672 68.96715147626841 1 0
    10630754 21839 67.37560182681605 1 167
    10630754 21930 66.66824642705946 1 258
    10630754 22245 65.96089102730286 1 573
    10630754 22343 65.60721332742455 1 671
    10630754 22602 66.31456872718115 1 930
    10630754 23069 66.31456872718115 1 1397
    10978238 21035 71.26605652547735 0 0
    10978238 21152 70.02818457590331 0 117
    10978238 21355 69.67450687602499 0 320
    10978238 21571 70.20502342584246 0 536
    10978238 21734 70.02818457590331 0 699
    10978238 23099 71.08921767553821 0 2064
    11039520 21090 60.30204782925007 1 0
    11039520 21193 59.241014729615166 1 103
    11039520 21375 60.478886679189216 1 285
    11039520 21581 59.59469242949346 1 491
    11039520 21791 59.94837012937177 1 701
    11039520 21963 59.41785357955432 1 873
    11039520 22330 59.94837012937177 1 1240
    11083593 21497 63.13146942827646 0 0
    11543564 22069 67.9061183766335 0 0
    11543564 22362 67.55244067675521 0 293
    11627504 21634 62.42411402851986 1 0
    11627504 21721 62.247275178580715 1 87
    11627504 21949 62.247275178580715 1 315
    11627504 22264 62.07043632864156 1 630
    11627504 22459 61.539919778824114 1 825
    11644808 21579 65.4303744774854 1 0
    11644808 21663 65.07669677760711 1 84
    11644808 21832 65.4303744774854 1 253
    11644808 22077 62.777791728398164 1 498
    11644808 22215 61.18624207894581 1 636
    11644808 22602 65.0766967776071 1 1023
    11650949 21301 71.4428953754165 1 0
    11650949 21494 70.0281845759033 1 193
    11650949 21683 67.37560182681605 1 382
    11650949 21886 68.96715147626841 1 585
    11650949 22189 66.66824642705944 1 888
    11650949 22320 68.96715147626841 1 1019
    11650949 23064 69.674506876025 1 1763
    11650949 23300 69.674506876025 1 1999
    11670103 20691 68.2597960765118 0 0
    11670103 21231 67.5524406767552 0 540
    11670103 21270 67.5524406767552 0 579
    11670103 21475 66.13772987724201 0 784
    11670103 21648 67.5524406767552 0 957
    11670103 21867 68.43663492645095 0 1176
    11670103 22265 67.02192412693776 0 1574
    11725377 20635 77.63225512328674 0 0
    11725377 20730 67.37560182681605 0 95
    11725377 20837 66.84508527699862 0 202
    11725377 20997 65.7840521773637 0 362
    11725377 21068 79.93116017249568 0 433
    11725377 21131 65.0766967776071 0 496
    11725377 21230 66.31456872718115 0 595
    11725377 21308 65.78405217736369 0 673
    11725377 21494 66.31456872718115 0 859
    11725377 21593 66.49140757712031 0 958
    11725377 21718 66.4914075771203 0 1083
    11725377 22043 66.13772987724201 0 1408
    11725377 22127 66.4914075771203 0 1492
    11725377 23386 66.13772987724201 0 2751
    11766382 21208 72.1502507751731 0 0
    11766382 21384 67.55244067675521 0 176
    11766382 21503 65.96089102730286 0 295
    11766382 21636 65.78405217736372 0 428
    11766382 21823 65.43037447748542 0 615
    11766382 21979 66.31456872718115 0 771
    11766382 22063 66.4914075771203 0 855
    11766382 22399 65.4303744774854 0 1191
    11766382 22602 65.96089102730285 0 1394
    11766382 23334 65.4303744774854 0 2126
    end
    format %tdDD/NN/CCYY date_oct



  • #2
    The only difficulty you have is some people are lost to follow earlier than others, and the intervals between subsequent assessments are irregular. The irregular intervals are not a problem unless you were hoping to model autoregressive error structure.

    The loss to follow at different times may be a problem, depending on why that happens. Ideally, you would have followed everybody for the same amount of time. If loss to follow can occur for reasons related to the measurement itself, for example, if the measurement is associated with visual function and patients who feel they are doing poorly are more likely to stop showing up, then you have a problem of bias in the data. There is no good solution to that, whether you use a mixed effects model or any other analysis. But if the loss to follow-up is exogenous, then the data can be considered missing at random, or even completely at random, and a mixed-effects model will work happily with the data.

    The other issue, of course, is whether treatment is randomly assigned here. If this is just observational data, then, of course, selection issues can be a big problem, too, no matter what analytic approach you take and you should consider an analysis that seeks to address differences between the treated and untreated that might affect the outcome variable.

    Comment


    • #3
      Dear Clayde,

      I am writing to express my sincere gratitude for your prompt response. Your assistance is greatly appreciated.

      The data we are analyzing pertains to retrospective observations from treated patients who underwent various retinal tests at different points in time. Our primary objective is to determine whether the question test is a reliable predictor of treatment failure.

      Could you please provide me with an example of a mixed model that would be relevant to our study? Thank you once again for your time and assistance. I look forward to hearing back from you soon.

      Warm regards,

      Comment


      • #4
        Well, what is your research hypothesis? What constitutes "treatment failure?" I don't see any variable like that in the example data. And at what leaad time time do you want to assess the ability of this test to predict future treatment failure? Is it even definable in the group with treatment = 0? And if not, what is the use of that subgroup's data here?
        Last edited by Clyde Schechter; 21 Mar 2024, 13:46.

        Comment


        • #5
          Hello Clyde, the objective is to see if the OCT test predicts treatment failure, which is the variable treatment==1. Some articles have constructed an annualized rate and have searched for a cutoff point.

          Thanks !!

          Comment


          • #6
            Oh, so the variable called treatment does not distinguish a treatment and control group, it is actually an indicator for treatment failure. That's a very different picture from what I had imagined.

            This still leave some other questions unanswered and raises some new ones. Typically when we study whether a test predicts an outcome, the test is administered at the start of the study observation period, and then either the outcome is ascertained as having occurred or not at some fixed time interval afterward, or in more detailed studies, participants are followed and the time to occurrence of the outcome is ascertained (with some people having a censored result because they never experience the outcome during the study.) This data does not resemble either of those designs. The test is repeated more or less periodically (it seems typically about 6 months, though there is a fair amount of irregularity here), and it is noted whether the participant experienced the outcome. But we don't know when in this series of events the treatment failure occurred (in those for whom treatment = 1), nor at what point in time it was finally determined to consider that treatment failure is not going to occur (in those for whom treatment = 0). Perhaps in all instances this was as of the date of the final observation? Whatever it was, without a clear chronology, it isn't possible to say much about this.

            Assuming that you don't actually have the dates at which treatment failure was recognized (or determined to be not occurring at all for the participant), the next question is what kind of prediction from the test you are looking for. Serial testing, as you have done, can be used in different ways. Sometimes the approach is to average the results of several measurements, to try to average out measurement error and other noise, and see if the averaged results are a good predictor of the (ultimate) outcome. On the other hand, sometimes it is actual trends in the serial measurements over time that are expected to be predictive. For example, it might be that an increase in values over time (or an increase faster than some threshold amount) is expected to predict the outcome. Or something like that.

            Anyway, I need to know in what way you expect the test to be used for prediction. Simply saying "see if the OCT test predicts treatment failure" is too non-specific to serve as the basis for an analysis.

            Comment


            • #7
              Hello Clyde, your comments are very helpful to us. I will share them with the rest of the team. Thank you very much!

              Comment

              Working...
              X