Announcement

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

  • #16
    Nick,
    thank you for your helpful answer. When separating the variables I succeded in specifying the labels. However it is not possible to Label the variables manually in the forval Expression so that I finally did two Loops.

    One question still arised: We talked about the fact that, the Points sometimes are doubled or more. Is there any possiblity to Display how many observations exist of the same Kind. I used a Scatterplot with c(L) and eventually it is possible to indicate the number of observations for this Point with a Little figure near the Points on the graph?

    Comment


    • #17
      You can add annotations of the numbers of observations. The easiest way is to put those into a variable and use marker labels.

      Code:
      sysuse auto, clear
      
      egen mean_mpg = mean(mpg), by(rep78 foreign)
      
      egen count_mpg = count(mpg), by(rep78 foreign)
      
      separate mean_mpg, by(foreign) veryshortlabel
      
      twoway connected mean_mpg? rep78, c(L L) sort ytitle(Mean mpg) xla(1/5) mla(count_mpg count_mpg) mlabpos(12 12) mlabsize(*1.5 ..)

      Comment


      • #18
        Nick,
        thank you again for your answer? Now I still would like to have the Label of a variable for the title of a diagram. I am Aware of the fact that title() exists, but is it possible to run a function like this: title("Label of Variable x")?

        Comment


        • #19
          Code:
          title("`: var label x'")
          
          
          help macro 
          help extended fcn

          Comment

          Working...
          X