Announcement

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

  • Interpreting multilevel mixed-effects linear regression

    Hi,

    I am doing medical research and I am currently facing some challenges.

    I have received help from the biostatistics department and they helped me create this model:

    mixed Concentration_of_1 bn.Randomization Dose_of_Drug_1 Concentration_of_Drug_2 Weight || ID:

    Two groups were examined to see if Drug 3 had an influence on the Concentration of Drug 1. They were randomized into two groups, Group B receiving Drug 3 and Group A not receiving it.
    Factors to also consider that might have an effect were Dosage of Drug 1, Concentration of drug 2 and weight. Each person had several samples.

    I am having a hard time interpreting the coefficients. What do they really mean? And I was told that the p-values aren't of much importance here, but rather the confidence intervals.
    And how come there is no coefficient for group B? Is this right?

    Your help is much appreciated.
    Click image for larger version

Name:	Mixed statalist.png
Views:	1
Size:	32.9 KB
ID:	1583458


  • #2
    While I cannot help you with the meaning of these numbers (since I do not know the drugs or the trial in detail), I can point out a few things.

    First, the results mean that there is no statistically significant effect at all since the p-values are large (the CIs give the same impression since 0 is always included). With bn.Randomization you set that B is your reference level, that is, the coef of A is in relation to this. This means that participants in group A have a concentration that is, on average, about -1.83 points (or whatever your unit is) lower than those people in group B. I think its interesting that the chibar below is rather small and the p value is almost above 0.05, which means that there is little correlation within your participants. This is usually not the case in this kind of trial, that is the reason why you used mixed instead of regress. From these results one would conclude that there is no difference between group A and B under control of the other variables in the model. Also strange is that the number of data points is quite spread and between 1 and 9 with an average of 2.3 data points for each participant. Why do some participants have so many points while most have 2-3? This might be of interest to consider.
    Best wishes

    (Stata 16.1 MP)

    Comment


    • #3
      Thank you so much Felix. Very good explanation.
      The number of data points for each participant varies a lot since Concentration of 1 was kept in a certain range. This required many measurements in some participants and few in others.
      Can I ask you what does it mean when the Dose of Drug 1 has an insignificant p-value? Does that the mean that there is no correlation between the dosage of 1 and the concentration of 1? And what does the coefficient 0.0020874 say in this instance?

      Comment


      • #4
        Mh that's strange. If the outcome is the concentration of drug 1 and the dose of drug 1 does not have an effect, that indeed means that, under control of all other variables in the model, there is no statistically significant effect. While the value means that whenever the dose rises by 1 unit, the concentration rises by 0.00208 units, the insignificant p-value means that we are not sure whether his finding holds in the population since the variation in outcomes is rather large. A larger sample size could help to solve this. But maybe something else went wrong because these results look strange to me.
        Best wishes

        (Stata 16.1 MP)

        Comment


        • #5
          I am pretty much sure something not right here i.e. your model is not correct. If you have a 'mixed' model, where is your time variable in the model? Can you show a data example. Please see the FAQ section on how to provide a data example using -datex- and post them using code delimiters. In a 'mixed' model you typically would estimate the change in outcome over time between two groups, therefore a time#group interaction is required. It will be difficult to assess unless you further provide some data example.
          Roman

          Comment


          • #6
            Thank you Roman.

            225 participants randomized to A or B. 550 measurements of concentration of drug 1. Almost all participants have one measurement in first week. Later measurements vary more from participant to participant in when and how often they were taken.

            A did not receive drug 3. B received drug 3.

            Does Drug 3 have an effect on Concentration of Drug 1?
            Difficulties are that concentration of drug 1 was kept in a certain range, so dose of drug 1 has to be taken into account.

            Perhaps drug 2 that both groups received and weight also have an effect on concentration of drug 1.

            mixed Conc1 bn.Rand01 Dose1 Conc2 Weight || ID:

            The above is the best model I have so far. But perhaps more things or variables need to be taken into account, for example time?

            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input str14 ID double Conc1 int Dose1 double Conc2 int Days str1 Rand int Weight long Rand01
            "1001"             51 2000   15    5 "B"  78 2
            "1001"             53 2000  8.2  198 "B"  78 2
            "1003"             49 2000    .    1 "B"  84 2
            "1003"             64 1500   10  183 "B"  84 2
            "1003"             53 1500  4.8 2045 "B"  84 2
            "1004"             47 2000    .    0 "A" 103 1
            "1004"           76.4 1500  9.9   49 "A" 103 1
            "1004"           57.8 1000   10  100 "A" 103 1
            "1005"             59 1500  6.3  104 "A"  76 1
            "1005"             61 1500  6.3  369 "A"  76 1
            "1006"             53 2000    .    5 "B"  71 2
            "1006"             56 2000   15   26 "B"  71 2
            "1006"             59 1500  8.3  362 "B"  71 2
            "1007"             59 2000    .    1 "A"  89 1
            "1007"             67 1500  5.9   27 "A"  89 1
            "1007"             97 1000   11  102 "A"  89 1
            "1007"             53 2000  7.1  384 "A"  89 1
            "1008"             43 2000    .    0 "A"  86 1
            "1009"             47 2000    .    1 "A"  62 1
            "1009"             56 1500    .   89 "A"  62 1
            "1009"           62.7 1000    .  144 "A"  62 1
            "1009"             56 1250    .  328 "A"  62 1
            Click image for larger version

Name:	statamixed.png
Views:	1
Size:	30.9 KB
ID:	1583628
            Last edited by Jonathan Teller; 27 Nov 2020, 05:06.

            Comment


            • #7
              Originally posted by Jonathan Teller View Post
              Thank you Roman.

              mixed Conc1 bn.Rand01 Dose1 Conc2 Weight || ID:

              The above is the best model I have so far. But perhaps more things or variables need to be taken into account, for example time?
              I think you should. Your participants were repeatedly measured on the outcome Conc1. Your model ignores the fact that group A & B may have different level of Conc1 at different times. You need to estimate time related mean Conc1 for group A & B and test if Conc1 in group-A are different than Conc1 in group-B at different times. They may be similar at one time point but different at other times. I will get back to this later again at a time when I am a little free. But before that may I ask what is Conc2 doing in the model? I understand weight needs to be there to do some sort of adjustment but a little description of Conc2 will help. It is missing in many cases and reducing your sample size.

              Please note as per forum rules, you are expected to show the full command you used for your model. From above, we can't see your 'xtset' command you used for your model without which you cannot run the 'mixed' model. Also you could have used code delimiters for presenting your Stata codes and results instead uploading pictures. For doing this click on the # sign while you are writing and put all your Stata commands/results inside the code delimiters [code] [\code].
              Roman

              Comment


              • #8
                Expanding on my previous: I just noticed that in your model above, you specified bn.rand01. By doing this you essentially are saying there is no base level to compare which is not what you want and that is why one of your randomised group has been omitted from the model. See below codes for what I think your model should be as your data is repeatedly measured:

                Code:
                ren *, lower // I renamed all variable to lower case for my programming habbit. You can ignore it
                
                //Generate a time variable
                
                byso id : g time = _n
                
                //Make id's numeric from string
                destring id, replace
                
                //xtset data:
                xtset id time
                
                //labels values of two randomised group
                lab define t 1 "Control" 2 "Treatment", modify
                lab val rand01 t
                
                //fit the model with time#group interaction. I ignored conc2 as your data example is too small to let my model run with missing values in it.
                
                mixed conc1 i.time##i.rand01 dose1 weight || id:
                
                //Model resutls:
                ------------------------------------------------------------------------------
                       conc1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                        time |
                          2  |   5.584617   5.789327     0.96   0.335    -5.762255    16.93149
                          3  |   2.050217   9.794884     0.21   0.834     -17.1474    21.24784
                          4  |  -2.844068   6.361263    -0.45   0.655    -15.31191    9.623778
                             |
                      rand01 |
                  Treatment  |   2.987409   5.687295     0.53   0.599    -8.159485     14.1343
                             |
                 time#rand01 |
                2#Treatment  |  -2.369383   7.388134    -0.32   0.748    -16.84986    12.11109
                3#Treatment  |  -7.495398   8.906024    -0.84   0.400    -24.95088    9.960087
                4#Treatment  |          0  (empty)
                             |
                       dose1 |  -.0207086   .0091626    -2.26   0.024    -.0386669   -.0027503
                      weight |   .1656414   .1629751     1.02   0.309    -.1537839    .4850668
                       _cons |   76.56497   20.37318     3.76   0.000     36.63426    116.4957
                ------------------------------------------------------------------------------
                
                // Estimate time specific means for groups
                margins i.time#i.rand01
                marginsplot //graph means (See the graph attached to understand the model parameters. Its not nice looking given the small data sample but will help)
                
                // test the means for two groups at times: Null hypothesis is groupd differences are zero at each time points
                margins time, dydx(rand01)
                marginsplot, yline(0, lpatt(dash))
                If you think outcome may vary depending on how dose1 or any other variable varies between groups, you can add an interaction term in the mode. Below is an example assuming dose1 varies between groups and my have impacted outcome:

                Code:
                //Refitting model with dose1 interaction term:
                mixed conc1 i.time##i.rand01##c.dose1 weight || id:
                
                //Predict outcome at different level of dose: holiding dose1 at mean and one standard deviation above and below:
                
                qui su dose1
                loc m = r(mean)
                loc sdl = r(mean)-r(sd)
                loc sdu = r(mean)+r(sd)
                
                margins i.time#i.rand01, at(dose1=(`sdl' `m' `sdu'))
                marginsplot, xdim(time) by(dose1)
                You may also want to explore whether effect of dose1 is nonlinear on outcome or allowingng time to have random slopes for each subject. All these explorations are beyond my scope here. That is my understanding from your data but of course you may have different views given your research problem.

                Click image for larger version

Name:	tet.png
Views:	1
Size:	34.6 KB
ID:	1583724
                Roman

                Comment

                Working...
                X