Announcement

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

  • Tabulate Data

    Hello

    Is it possible to format the attached data in a tabulated form that will return the median of the 'median_wintime' by course, racetype, distf_round, going. Only the median for the cases with a 1 in the 'win' column should be considered.

    Thank you

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str7 course str5 racetype byte distf_round str12 going float median_wintime byte won
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 1
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Firm" 232.2 1
    "Aintree" "Chase" 16 "Firm" 232.2 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 1
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    "Aintree" "Chase" 16 "Good"   238 0
    end

  • #2
    This sounds like a need for the median() function of the egen command.

    Comment


    • #3
      Hi Nick,

      I have already calculated the required medians on the main datasheet. Was looking to summarize those medians by various groups pivot table style. Tried the tabulate function but 'Row variables' will not allow the entry of string variables in the relevant box.

      Comment

      Working...
      X