Announcement

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

  • Creating tertiles for the relationship between two continuous variable

    I have two continuous variables CTX, a marker of bone resorption and another variable representing standardised values of bone mineral density at the spine (BMD_SPINE).Is there a way in Stata that I could create tertiles that represent the relationship between these variables i.e I would like to split the relationship given in the attached scatter plot to represent three (approximately equal) groupings.

    Thank you.

    Attached Files

  • #2
    You can do it -- and see

    Code:
    help xtile
    if someone is obliging you to do this -- but why do you think it would help in any statistical or scientific sense?

    I get no sense whatsoever that groupings here could be anything but arbitrary. You would lose much of the information in the data. People's bone changes aren't influenced by their percentile rank.

    I would consider

    1. looking at CTX on a log scale

    2. using open symbols such as ms(oh) which work better when points overlap

    3. using a scatter plot smoother such as lpoly (localp (SSC) is an attempt to make that friendly: see http://www.statalist.org/forums/foru...ial-regression).

    If you posted the data, people could experiment.

    Comment


    • #3
      Thank you Nick.

      At the moment we want to use this exploratory analysis to identify individuals who fall with the first and last tertile of the combination between CTX and Z_FN. Using xtile allows for one variable at a time
      Code:
      xtile QZ_FN=Z_FN, n(3)
      ,I on the other hand would like to produce tertiles of the relationship between CTX and Z_FN. Below is the data extract

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input double(Z_FN CTX)
       -.2  .258
        .5  .515
       -.2  .255
       1.9  .407
        .8     .
       1.7  .489
        -1 .5075
        .1  .688
       1.5  .274
       -.1  .536
       -.7  .215
      -1.3   .54
        .9   .52
       1.4  .148
       -.1  .091
        .7  .114
        .7  .143
       -.9  .731
        .5  .284
      -1.5  .499
      end

      Comment


      • #4
        Thanks for the data example, but it's too small to provide a serious test of any fitting, smoothing or exploratory method.

        I don't understand what you want in terms of tertiles for the combination or relationship. That would seem to require defining an axis along which you could group observations and thus to prejudge what the relationship is!

        I don't want to seem too blunt, but I remain stubbornly unconvinced that the approach has any merit. Perhaps someone else will chime in.

        Comment

        Working...
        X