Announcement

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

  • creating a summary

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(mechanicid make mpg volume)
    10 1 12 1
    10 0 11 1
    10 0 12 1
    10 0  1 1
    12 1 12 2
    12 1 13 2
    12 1 12 2
    12 0 14 2
    12 0 13 2
    12 0 15 2
    12 0 20 2
    13 1 14 1
    end
    label values volume outcome_grp2
    label def outcome_grp2 1 "low volume", modify
    label def outcome_grp2 2 "high volume", modify


    Hi I've got a list of mechanics = mechanicID and each mechanic treated a car with respective characterises:
    foreign or domestic (categorical) ; mpg (continuous)
    Each mechanic has been categorised into a volume group

    I would like to create a table to create summary of the details of the characteristics of the cars the mechanics treat
    - I would like to obtain the median mpg

    With this code, I manage to generate a table with the mean however, I would like to generate the overall median for the volume groups
    I'm not sure if you can change the code to get a median (I don't think so).... if so what's the alternative?

    Code:
    table1_mc, by(volume) ///
    vars ( ///
    mpg contn %4.1f \ ///
    make bin %4.0f \ ///
    ) ///
    nospace missing

Working...
X