Announcement

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

  • determining lower and upper limits of a variable derived from another variable

    good evening, i have a continuous variable and used xtile to derive 4 quartiles, and therefore create a new variable with four categories. What i would like to know is how can i find the upper and lower limit of the quartiles, there is a slight complication in that the file with the quartiles in has been restricted to only the most recent event of the women, whereas the file the quartiles were derived in hathe woman may have had more than one event. The restrained file also contains four data sets stacked so would also need the upper and lower values for each of the seperate data sets. Is this possible???

  • #2
    Here is what I understood from your question:

    Code:
    sysuse auto, clear
    xtile qprice=price,nq(4)
    table qprice, c(min price max price min weight max weight)
    produces:
    Code:
    --------------------------------------------------------------
    4         |
    quantiles |
    of price  |  min(price)   max(price)  min(weight)  max(weight)
    ----------+---------------------------------------------------
            1 |       3.291        4.195        1.830        3.600
            2 |       4.296        4.934        1.760        3.690
            3 |       5.079        6.342        2.040        4.130
            4 |       6.486       15.906        1.990        4.840
    --------------------------------------------------------------
    Lower and upper limits of the quartiles are listed in first two columns, a summary of another variable (weight) in the last two columns.

    Hope this helps.

    Comment


    • #3
      thanks very helpful

      Comment

      Working...
      X