Announcement

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

  • Lowess smoothing paramters

    Hello all,
    I am trying to check if there is a linear relationship between the number of serious adverse effects (complications) vs the mean no of mesh surgeries done by the consultant each year.

    This time I am using a binary variable coded as 1/0 . 1 if there has been an adverse effect.

    I obtained the following graph . As you can see it is a linear straight line unlike my other post here:
    https://www.statalist.org/forums/for...ing-parameters

    I just wanted to see if my logic is correct:
    It seems I got a strictly linear relationship
    Therefore I do not need to use splines to model a non-linear relationship on the volume of cases done my each surgeon
    I can now continue to use a normal logistic regression.

    Is my logic correct?

    Code:
    lowess seriousadverseffect meanmeshyearly, ylabel (0 "No Adverse effects" 1 "serious adverse effects") jitter(5) adjust


    Attached Files
    Last edited by Denise Vella; 25 Aug 2023, 06:28.

  • #2
    It appears that every doctor in your dataset has had exactly one adverse event. The lowess plot is not useful here because the y-variable is constant (it equals one). I think instead you wanted to graph the total number of adverse events, which I might expect at least a little variation. However, if the outcome of interest is "did the patient have any adverse event", then you can skip this graph and look at tabulations of percentages by doctor, or overall, model it using logistic regression using mean surgeries as a covariate.

    Comment


    • #3
      Thanks for your logic Leonardo Guizzetti
      Just following of what the help file on stata did here who also modeled it on a binary variable (car : foreign vs domestic) with a x variable mileage
      rlowess.pdf (stata.com)

      I take your point
      If I want to check if there was any difference in the number of complications a surgeon had vs the mean no of surgeries done by the surgeon per year (translating to experience)
      I would use a logistic regression to check if this has any relationship or perhaps should I use stcox, with the failure event being complication ?

      There are 900 surgeons and a table would look too big..

      Comment


      • #4
        I see now that you have changed your attached graphic since my post in #2, so my previous comment no longer applies.

        If you want to model whether there was a relationship between the number of complications a surgeon had vs the annual rate of surgeries done by the surgeon, why not make a scatter plot of this directly (with an optional lowess curve).

        You can model this using Poisson general linear model where the outcome variable is the number of adverse events associated with that surgeo, and the covariate is the factor variable of surgeon ID. You would set number of surgeries performed by each surgeon as the exposure to account for surgeon experience. There is no linearity assumptoin about this relationship because the surgeon-specific events are modeled directly. You would substitute in your own variable names, of course.

        Code:
        glm n_adverse_events i.surgeon_id , family(poisson) link(log) exposure(number_surgeries) vce(robust)

        Comment


        • #5
          Leonardo Guizzetti Thanks. I always like to read your logic.
          with regards to your post4, thanks for your input

          question 1:
          but rather than just accepting, may I ask , what are your reasons for using possion rather than going for stcox ?

          Could you not model stcox as failure = adverseevents.
          no linearity assumption is required in stcox but just a PH which needs to be tested in the end

          question 2:
          with regard to just plotting a scatter plot are you referring to my post1 with jitter in the code?
          Or just a scatterplot?

          thanks you really are a great statistician/ epidemiologist. I really enjoy reading your logic thinking once again rather using ‘this is how to do it’ mentality.

          Comment


          • #6
            Originally posted by Denise Vella View Post
            Leonardo Guizzetti
            question 1:
            but rather than just accepting, may I ask , what are your reasons for using possion rather than going for stcox ?

            Could you not model stcox as failure = adverseevents.
            no linearity assumption is required in stcox but just a PH which needs to be tested in the end

            question 2:
            with regard to just plotting a scatter plot are you referring to my post1 with jitter in the code?
            Or just a scatterplot?
            You're welcome.

            #1) The choice of a Poisson GLM is not arbitrary. It models the mean number of events while allowing for exposure to be included in the model. You don't have to do this and you can use linear regression, but then you'll have to account for experience in the model somehow.

            As for Cox regression, I don't see that timing is relevant to your question. Cox regression will help you to answer if the first event happens sooner or later on average. There isn't anything special about the first event, or the second, or third. Rather it seems important to model some measure of overall risk. Your earlier posts suggest you are concerned about occurrence of any event or the number of events. Frailty models exists that allow you to model multiple occurrences of the same event, but that's yet another complication on the same basic issue.

            Logistic regression could be another way to model risk in terms of odds ratios for the average rate of adverse events, with similar caveats to poisson/linear regression above.

            #2) You can look at a couple of scatter plots. One has number of adverse events for the surgeon on the y-axis and mean adverse event rate on the x-axis. This gives an overall impression of how experience relates to total events. Ohter scatter plots could be to number the surgeons from 1 to N, and plot this id on the x-axis with either the number of events or mean adverse event rate on the y-axis. This gives you a sense of the variability of events (in absolute or relative terms) across physicians.
            Last edited by Leonardo Guizzetti; 25 Aug 2023, 17:12.

            Comment


            • #7
              Wow really useful.
              if I may One last question, I take your point regarding Posioon regression for no of adverse events such as the patient having a blood clot or a stroke.

              Very true, this has no relation to time. It’s just the patient just had a complication - which could have been at 5 days or 90 days (time here is irrelevant but just the patient had the complication) and I do want to see if this has a relationship with regards to surgical experience

              in addition, if I was looking at revision of the procedure (a prosthesis for eg), which does have a relationship to time - I would use a cox regression for here. Perhaps a surgeon with less experience, the implant fails sooner compared to someone with more experience…is this reasoning correct ?

              Comment


              • #8
                Yes, that could be reasonable. Whatever you decide, you need to be clear about what precisely you want to know, and whether you need to emphasize time or events (occurrences, counts) to answer that question.

                Comment

                Working...
                X