Announcement

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

  • Overlay qqplot combine graphs

    Hello,

    I have four variables which I would like to generate quantile plots for. These are q_base q_final1 q_final2 and qfinal3.

    q_base is to be depicted on the x-axis and the other three on the y-axis. Therefore, my qqplots are:
    Code:
    qqplot q_final1 q_base
    qqplot q_final2 q_base
    qqplot q_final3 q_base
    I'd like to overlay the graphs and basically generate one qqplot which maps q_final1 q_final2 and q_final3 against 1_base on the same graph.

    Any help is much appreciated!

  • #2
    Ariel Linden's qqplot3 (ssc desc qqplot3) allows one to save the generated quantiles.

    Comment


    • #3
      cquantile (SSC) will also help here.

      Code:
      clear 
      set obs 100 
      set seed 2803 
      
      foreach v in q_final1 q_final2 q_final3 q_base { 
          gen `v' = rnormal()
      } 
      
      forval j = 1/3 { 
          cquantile q_base q_final`j', gen(b`j' f`j') 
      } 
      
      scatter f* b1, legend(order(1 "final 1" 2 "final 2" 3 "final3") pos(11) ring(0) col(1)) ///
      xtitle(base) aspect(1) ytitle(final) ms(Oh X Sh)

      Comment

      Working...
      X