Announcement

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

  • Trend analysis - ptrend

    Hi Listers,

    I am interested in assessing the relationship between diabetes diagnosis (yes/no) and age in my data. In the summary statistics, we report results by age group but for this analysis I am opting to use age as continuous - still to clear it with my colleagues.

    it was suggested I may want to use the Cochran-Armitage trend test using ptrend

    ptrend nyes nno age

    The Chi2 for departure has p<.001 which suggests the null hypothesis is not met. Does it mean that I should not be using the CA test as the assumption of linearity is not met?

    I am also considering that, seen that I am using age as continuous, I could simply run a simple logistic regression with age as a predictor. Is there a way to assess if there is a linear association between diagnosis and age? Plotting the data shows a decrease with a dip at age 55 which is followed by an increase in diagnosis rates which suggests a non-linear association.

    What's the best way forward?

    Thank you in advance!

  • #2
    You might look at https://www.stata.com/support/faqs/s...est-for-trend/

    With a user written procedure, help depends on someone active knowing the procedure. You may need to contact the authors. However, many such things can be done with conventional estimators (see the website noted above). A linear association between age and diagnosis could be done with logit or probit or even regress. Note you'd be using a model of the probability of diagnosis. A dip for a given year suggests something exogenous is influencing diagnosis - cost relate to insurance, or something else.

    Comment


    • #3
      Laura:
      I would go as follows:
      Code:
      logistic diabetes_diagnosis c.age##c.age
      see what Stata give you back and, if you need further assistance, post back on this forum reporting, within CODE delimiters, what you typed and what Stata gave you back.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment

      Working...
      X