Announcement

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

  • Variable not found error

    Hello everyone,
    I am performing a test in Stata using the command "utest var1 var2", prior to performing the test i run a regression using var1 as the dependent variable and var2 as one of the exogenous variables. When i come to perform the test, i am giving the error "gdpg not found" what could be the cause of this? i have used "d gdgp" and i get results showing that gdpg does exist. What am i doing wrong here?

  • #2
    Please review the FAQ. Section 12 contains this advice:

    Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly! If you can, reproduce the error with one of Stata's provided datasets, a small fragment of your dataset, or a simple concocted dataset that you include in your posting.

    Comment


    • #3
      Thanks Friedrich for the guidance.
      This is what i typed in stata first
      "reg gdpg scgdp scgdp2 infl gcf secenroll"
      then i got the regression results

      after that i put in
      "utest gdpg scgdp"

      Stata replied
      "gdpg not found" "r 111"

      Comment


      • #4
        You should please explain where utest comes from (SSC). This also is explained in the section of the FAQ which Friedrich pointed you towards.

        From a glance at the help for utest, it is evident that you do not echo the name of the response in invoking the command. In your case the command should be (I guess, because you have given us no definitions)

        Code:
        utest scgdp scgdp2

        Comment


        • #5
          You can click on the r(111) error code to get this information from the Stata help file:

          [P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 111
          __________ not found;
          no variables defined;

          The variable does not exist. You may have mistyped the variable's name.
          In your case there is no variable with the name gdpg.

          Comment

          Working...
          X