Announcement

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

  • Xtitle: Unrecognized command error

    Hello. I am trying to replicate a figure from the code I got from the authors of a paper.

    When I run the code


    scatter indexcc indexlc indexnv date, ms(oh th sh) clcolor(black black black) mcolor(black black black)
    xtitle(Year) ytitle("") connect(l l l) xlabel(1990(2)2002) ylabel(80(20)140) yscale(range(75 140))
    title(Figure 2) subtitle(Assessing the Validity of the Counterfactual)
    t2title(House Price Indices For Single Family Residences 1990-2002) legend(order(1 2 3) col(1)
    label(1 "Churchill County -- microdata") label(2 "Lyon County -- microdata")
    label(3 "State of Nevada -- OFHEO")) || line vcc1 vcc2 date, clpattern(dash dash) clcolor(gs13 gs13)


    My "Xtitle" command returns an error: unrecognized command.

    Error message below.

    'command xtitle is unrecognized'

    I have searched and looked at the stata guide and cannot spot my error. I would be grateful for any assistance. Thank you.

  • #2
    The second line is read as a command. I have added line-breaks below, run in a do-file.

    Code:
    scatter indexcc indexlc indexnv date, ms(oh th sh) clcolor(black black black) mcolor(black black black) ///
    xtitle(Year) ytitle("") connect(l l l) xlabel(1990(2)2002) ylabel(80(20)140) yscale(range(75 140)) ///
    title(Figure 2) subtitle(Assessing the Validity of the Counterfactual) ///
    t2title(House Price Indices For Single Family Residences 1990-2002) legend(order(1 2 3) col(1) ///
    label(1 "Churchill County -- microdata") label(2 "Lyon County -- microdata") ///
    label(3 "State of Nevada -- OFHEO")) || line vcc1 vcc2 date, clpattern(dash dash) clcolor(gs13 gs13)

    Comment


    • #3
      Thank you Andrew! It works!

      Comment

      Working...
      X