Announcement

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

  • #16
    These values look OK. In your problematic model, you include even more control variables:
    Code:
    AGE BMI ANX_preop cs ETHNICITY ANX_preop DEP_preop cs_previous HO_OTHERCHRON_PAIN
    I suspect the problem lies there. I would carefully assess each control and attempt to reduce the number of controls used. Your sample size is not that large. Start with a very simple model (in KHB) without many controls and see whether the results become more sensible.
    Last edited by Felix Bittmann; 28 Aug 2025, 04:55.
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment


    • #17
      Dear Felix Bittmann Sir,
      I kept only the maximum pain at 6 weeks and postpartum depression as mediator variable whereas max pain at 72 hours as a confounder and got the results as shown below.
      [CODE] khb logit cpsp intraop || pain6wk postdep, conc(AGE BMI ETHNICITY anxiety cs chronicpain predep pain72) summary dis or

      Decomposition using the KHB-Method

      Model-Type: logit Number of obs = 414
      Variables of Interest: intraop Pseudo R2 = 0.66
      Z-variable(s): pain6wk postdep
      Concomitant: AGE BMI ETHNICITY anxiety cs chronicpain predep pain72
      ------------------------------------------------------------------------------
      cpsp | or Std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      intraop |
      Reduced | 32.09183 25.80521 4.31 0.000 6.636497 155.1851
      Full | 15.82269 11.73416 3.72 0.000 3.698509 67.6915
      Diff | 2.028215 .6307756 2.27 0.023 1.102529 3.73111
      ------------------------------------------------------------------------------

      Summary of confounding

      Variable | Conf_ratio Conf_Pct Resc_Fact
      -------------+-------------------------------------
      intraop | 1.256082 20.39 1.2553123
      ---------------------------------------------------

      Components of Difference

      Z-Variable | Coef Std_Err P_Diff P_Reduced
      -------------+---------------------------------------------
      intraop |
      pain6wk | .5223103 .2628304 73.86 15.06
      postdep | .184846 .1744171 26.14 5.33
      -----------------------------------------------------------
      /CODE] thank you in advance

      Comment


      • #18
        I think the results are acceptable yet you should think about the theoretical relations of your variables in detail. There are multiple empirical challenges as well, such as the low number of cases, the scaling of your variables and their high intercorrelation. Maybe this is the best you can do. In any case, make sure to report your findings transparently and discuss the implications and limitations of your research.
        Best wishes

        Stata 18.0 MP | ORCID | Google Scholar

        Comment


        • #19
          Dear Felix Bittmann Sir,

          In this model, I kept the severity of intraoperative pain as exposure variable instead of presence/absence of intraoperative pain (binary)

          [CODE] khb logit cpsp severity_intraop || pain72 pain6wk postdep, conc(AGE cs chronicpain predep ) summary dis or

          Decomposition using the KHB-Method

          Model-Type: logit Number of obs = 414
          Variables of Interest: severity_intraop Pseudo R2 = 0.65
          Z-variable(s): pain72 pain6wk postdep
          Concomitant: AGE cs chronicpain predep
          ----------------------------------------------------------------------------------
          cpsp | or Std. err. z P>|z| [95% conf. interval]
          -----------------+----------------------------------------------------------------
          severity_intraop |
          Reduced | 5.82613 1.558264 6.59 0.000 3.449187 9.841099
          Full | 1.856794 .31095 3.70 0.000 1.337262 2.578168
          Diff | 3.137735 .6722714 5.34 0.000 2.061784 4.775176
          ----------------------------------------------------------------------------------

          Summary of confounding

          Variable | Conf_ratio Conf_Pct Resc_Fact
          -------------+-------------------------------------
          severity_i~p | 2.8477797 64.88 1.6560235
          ---------------------------------------------------

          Components of Difference

          Z-Variable | Coef Std_Err P_Diff P_Reduced
          -------------+---------------------------------------------
          severity_i~p |
          pain72 | .4213935 .1756077 36.85 23.91
          pain6wk | .683433 .2127939 59.77 38.78
          postdep | .0386749 .0359568 3.38 2.19
          -----------------------------------------------------------
          /CODE]

          Comment


          • #20
            If you can defend this model theoretically, the empirical results seem fine to me.
            Best wishes

            Stata 18.0 MP | ORCID | Google Scholar

            Comment


            • #21
              Dear Felix Bittmann Sir,
              Thank you. Earlier you suggested some code for finding the significance of each mediating variable statistically . I tried to run those, but it did not display the data. Please do suggest. Thank you once again.
              Asish

              Comment


              • #22
                Code:
                cap program drop khbboot
                program define khbboot, rclass
                    khb logit cpsp severity_intraop || pain72 pain6wk postdep, conc(AGE cs chronicpain predep) summary dis or
                    return scalar med1 = e(disentangle)[1,4]
                    return scalar med2 = e(disentangle)[2,4]
                    return scalar med2 = e(disentangle)[3,4]
                end
                
                *** Test ***
                khbboot
                return list
                
                *** Bootstrap ***
                bootstrap r(med1) r(med2) r(med3), reps(1000) seed(123) dots(10): khbboot
                estat bootstrap, bc
                Best wishes

                Stata 18.0 MP | ORCID | Google Scholar

                Comment


                • #23
                  Dear Felix Bittmann Sir,
                  For the first code I got the same result as before. In addition the following
                  [CODE]
                  scalars:
                  r(med2) = 2.194502881792457
                  r(med1) = 23.91084480460459
                  /CODE]
                  How do I interpret them?

                  For the bootstrap code, it was inconclusive
                  [CODE] bootstrap r(med1) r(med2) r(med3), reps(1000) seed(123) dots(10): khbboot
                  (running khbboot on estimation sample)
                  'r(med3)' evaluated to missing in full sample
                  r(322);

                  . estat bootstrap, bc
                  last estimates not found
                  r(301);
                  /CODE]
                  thank you once again.

                  Comment


                  • #24
                    My bad, there is a typo in my code. The correct code is:

                    Code:
                    cap program drop khbboot
                    program define khbboot, rclass
                        khb logit cpsp severity_intraop || pain72 pain6wk postdep, conc(AGE cs chronicpain predep) summary dis or
                        return scalar med1 = e(disentangle)[1,4]
                        return scalar med2 = e(disentangle)[2,4]
                        return scalar med3 = e(disentangle)[3,4]
                    end
                    
                    *** Test ***
                    khbboot
                    return list
                    
                    *** Bootstrap ***
                    bootstrap r(med1) r(med2) r(med3), reps(1000) seed(123) dots(10): khbboot
                    estat bootstrap, bc
                    Best wishes

                    Stata 18.0 MP | ORCID | Google Scholar

                    Comment


                    • #25
                      Dear Felix Bittmann Sir,
                      Thank you.

                      Comment

                      Working...
                      X