Announcement

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

  • Get data from mark in a box plot graph

    Hi all,

    I am trying to get data from a box plot graph with mark option, example:

    Code:
    clear all
    set more off
    sysuse auto.dta
    
    graph box price, mark(1,mlab(price))
    Click image for larger version

Name:	Sin título.png
Views:	1
Size:	9.5 KB
ID:	1520719



    My goal its get mark values as variable (data or flaged) something like:

    Mark Flag
    15906 1
    14500 1
    ... ...

    I tried using return list or ereturn list after graph but I could not get some data.

    It possible get this?

    Thanks in advance
    Rodrigo

  • #2
    You can start by using - serset - for that matter. Just type - help serset - to check it out.
    Best regards,

    Marcos

    Comment


    • #3
      Code:
      . sysuse auto, clear
      (1978 Automobile Data)
      
      . su price, detail
      
                                  Price
      -------------------------------------------------------------
            Percentiles      Smallest
       1%         3291           3291
       5%         3748           3299
      10%         3895           3667       Obs                  74
      25%         4195           3748       Sum of Wgt.          74
      
      50%       5006.5                      Mean           6165.257
                              Largest       Std. Dev.      2949.496
      75%         6342          13466
      90%        11385          13594       Variance        8699526
      95%        13466          14500       Skewness       1.653434
      99%        15906          15906       Kurtosis       4.819188
      
      . list price if price >= r(p75) + 1.5  * (r(p75) - r(p25))
      
           +--------+
           |  price |
           |--------|
        9. | 10,372 |
       11. | 11,385 |
       12. | 14,500 |
       13. | 15,906 |
       26. | 11,497 |
           |--------|
       27. | 13,594 |
       28. | 13,466 |
       41. | 10,371 |
       53. |  9,690 |
       55. |  9,735 |
           |--------|
       64. | 12,990 |
       74. | 11,995 |
           +--------+
      
      . sort price
      
      . list price if price >= r(p75) + 1.5  * (r(p75) - r(p25))
      
           +--------+
           |  price |
           |--------|
       63. |  9,690 |
       64. |  9,735 |
       65. | 10,371 |
       66. | 10,372 |
       67. | 11,385 |
           |--------|
       68. | 11,497 |
       69. | 11,995 |
       70. | 12,990 |
       71. | 13,466 |
       72. | 13,594 |
           |--------|
       73. | 14,500 |
       74. | 15,906 |
           +--------+

      Comment


      • #4
        Thanks Nick!! I was looking that!
        Regards
        Last edited by Rodrigo Badilla; 16 Oct 2019, 12:20.

        Comment

        Working...
        X