Announcement

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

  • #16
    Don't forget Lisanne's problem. When I send a Twoway command to Stata 13.1, I get this message. What is happening?

    Code:
    . Twoway (scatter mpg weight)
    unrecognized command:  Twoway not defined by Twoway.ado
    r(199);

    Comment


    • #17
      Svend: Good point. Thanks for pushing it.

      On further analysis I am in belated agreement with Rich's point about consistency and was wrong in asserting that Stata has two commands, twoway and Twoway.

      The user typing this is arguably making a mistake as nothing in the documentation that I know of implies that this syntax should work. However, there are undocumented commands that work, as I was at pains to emphasise earlier.

      Moreover, Stata is acknowledging that an .ado exists that it is prepared to call Twoway.ado, yet complaining that the program therein does not define a command called Twoway. And that's true, as the file in question does define a command, but it's twoway.

      On my system (Stata 13.1 on Windows) there is one and only file, which is called twoway.ado.

      So, perhaps there is legacy code in Stata, inherited from MS-DOS, that converts command names with upper case letters to lower case when it is searching for an ado file to define them, but to no avail because the program defined therein does not have those upper case letters as part of its name.

      I just tested this.

      Code:
      . which TWOWAY
      points to exactly the same file, but naturally attempts to use TWOWAY as a Stata command fail.

      Comment


      • #18
        Lisanne:
        What happens if you include this (lowercase) twoway command in your do-file?
        Code:
        twoway (scatter z_wfa age_months if (age_months <40 & use_tdf_preg==0), mcolor(gs2)) ///
        (lowess z_wfa age_months if (age_months <40 & use_tdf_preg==0), lcolor(gs2)) ///
        (scatter z_wfa age_months if (age_months <40 & use_tdf_preg==1), mcolor(gs5)) ///
        (lowess z_wfa age_months if (age_months <40 & use_tdf_preg==1), lcolor(gs5))
        Apart from the non-capitalization, it is identical to the command you showed in post #9, but I split it on several lines to make it easier to read for everybody, including yourself.

        Comment

        Working...
        X