Announcement

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

  • figure: option / not allowed

    Dear All,

    I run the following program but stata fails to draw the figure. Could you help me to identify the problem?

    sysuse nlsw88.dta, clear
    set more off
    twoway(kdensity wage if collgrad==0) ///
    (kdensity wage if collgrad==1),///
    xtitle("hourly wage") ///
    legend(label(1 "otherwise") ///
    label(2 "college graduate")///
    col(1) ring(0) pos(3))

    stata shows that:
    . twoway(kdensity wage if collgrad==0) ///
    > (kdensity wage if collgrad==1),///
    option / not allowed
    r(198);

    end of do-file

    r(198);


    Best,

    Eddie




  • #2
    Inlcude a space before the line continuation markers

    Code:
    sysuse nlsw88.dta, clear
    set more off
    twoway(kdensity wage if collgrad==0) ///
    (kdensity wage if collgrad==1), ///
    xtitle("hourly wage") ///
    legend(label(1 "otherwise") ///
    label(2 "college graduate") ///
    col(1) ring(0) pos(3))

    Comment


    • #3
      Dear Jorrit,

      stata still shows that



      . sysuse nlsw88.dta, clear
      (NLSW, 1988 extract)

      . set more off

      . twoway(kdensity wage if collgrad==0) ///
      > (kdensity wage if collgrad==1), ///
      > xtitle("hourly wage") ///
      > legend(label(1 "otherwise") ///
      > label(2"college graduate") ///
      > col(1) ring(0) pos(3))
      2college not found
      r(111);

      end of do-file

      r(111);

      Best,

      Eddie

      Comment


      • #4
        Dear Eddie,

        A space is required in between the 2 and the " in: label(2"
        Code:
        sysuse nlsw88.dta, clear
        set more off
        twoway(kdensity wage if collgrad==0) ///
        (kdensity wage if collgrad==1), ///
        xtitle("hourly wage") ///
        legend(label(1 "otherwise") ///
        label(2 "college graduate") ///
        col(1) ring(0) pos(3))
        as to produce:
        Attached Files
        http://publicationslist.org/eric.melse

        Comment


        • #5
          Dear Jorrit and Eric, Thank you sincerely and problem has been fixed.

          Comment

          Working...
          X