Announcement

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

  • KHB correct specification

    Hello,

    I have a question regarding the correct specification of the KHB models.
    I'm using Stata 19 to implement the following KHB model:

    khb logit y i.x || z, concomitant(age i.x2 i.x3 i.x4 i.x5 ...........)

    where y is a dummt variable, x is an ordinal variable with 3 categories, z, i.e. my mediator, is continuos ranging from 0-10, and then i have a bunch of controls which are mostly ordinal/categorical variable (the ones you see the i. in front) and only age (the only one i specified) is treated as a continuos calculated from birth date.
    I have doubts regarding the correctness of my model specification and in particulra I'm not sure whether in the confounders I should indeed include the i. when the nature of the variable would requires it in different models.
    Can someone help me?

    Thanks everyone in advance

  • #2
    Your general code seems fine to me. Whether or not to declare the controls with the i. prefix depends on many aspects, such as the number of distinct levels, the sample size and the specific distributions. I suggest you do some test and see how the specification influences your results.
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment


    • #3
      Thanks for the prompt feedback

      Best wishes

      Comment

      Working...
      X