Announcement

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

  • r(111) not found

    Hello this is my first post it's due to a little stuck on a code that I'm writing.
    I try to explain briefly the situation:

    I have a dataset (composed of: name-year-return-deposit-work-money-term) which was splitted in two parts using my own criterion

    gen midterm=1 if term>=3
    replace midterm=0 if term<3


    now my entire set is divided in two parts which has 1 and 0 as different value in midterm

    After that i would like to create many new variable according to this criterion so i did:

    gen hwork=work if midterm==1
    gen lwork=work if midterm==0

    gen hmoney=money if midterm==1
    gen lmoney=money if midterm==0

    gen hdeposit=deposit if midterm==1
    gen ldeposit=deposit if midterm==0


    at this point this variable are added to the (data editor) so they exist(i think?), and i want to make a test on them but i type:

    test hwork+hmoney+hdeposit=0

    and then...

    hwork not found
    r(111)



    I swear that in the browse editor i'm able to see the variable created(hwork,lwork,hmoney,lmoney,hdeposit,ldeposi t) but i'm not able to recognize what kind of problem is due that stop in execution.


    All that i want is to test the two subsample accordingly to their caracteristics in work money and deposit related to the variable midterm. What should i do to continue execution? and fix the "var not found" problem?

    P.S: the variables contain about 3000 observations

    Thank you all for your attention

    Best Regards

    Chris
    Last edited by Chris Nova; 14 May 2016, 17:21.

  • #2
    what are you trying to test? the "test" command is for use after some estimation command (e.g., regress) - but you haven't, apparently, estimated anything; so, what is your hypothesis?

    Comment


    • #3
      Ohh you are right!
      I forgot to implement the regression before the routine.
      Now it works.
      I should evaluate the degree of competition among the different midterm.

      so my hypotheses are going to test if they are =0, =1 or lied between 0 and 1

      i performed the test and i have

      test hwork+hmoney+hdeposit=0
      F(1, 978) = 0.13
      Prob>F= 0.7200

      it means that i fail to reject the null so my sample operates under monopoly regime. But I go on trying to test:

      test hwork+hmoney+hdeposit=1
      F(1, 978) = 0.00
      Prob>F= 0.9928

      It should means that my sample operates under perfect competition because i fail to reject the null again.

      Is it right or i'm misunderstanding the result?





      Thanks you a lot
      Last edited by Chris Nova; 15 May 2016, 02:41.

      Comment


      • #4
        In both tests you fail to reject the null. so the sum of the coefficients could be 0 or could be 1.
        But I don't quite understand what your'e testing, model wise. if the sum of the coefficients is 1 or 0 what does that mean in your model?

        Comment


        • #5
          My aim is to discover the degree of competition in the two subsamples that i generated before.

          I set two hypotheses: HA0:β1+β2+β3=1
          HB0:β1+β2+β3=0


          If Ha0 is not rejected the market operates under monopoly regime
          if Ha0 is rejected, i verify the hypothesis Hb0. If i cannot reject latter null-> the market operates under perfect competition regime
          If i also reject Hb0 the market operates unde monopolistic competition regime.



          For this reason for me it's strange to fail to reject both of them... what would it mean?


          regression that i made is
          reg return hdeposit hwork hmoney term, r

          is it possible that the regression i should carry out must be different such as:
          xtreg return hdeposit hwork hmoney term, fe

          In your opinion what is it preferable?
          Last edited by Chris Nova; 15 May 2016, 03:54.

          Comment


          • #6
            what's the underlying ("theoretical") model? why if beta1+beta2+beta3=0 than XYZ? Also note that the two hypotheses do not imply one another and are not mutually exclusive. if you fail to reject the null that beta=0, it does not mean that you will to reject the null that beta=1 or 100 or 824.4 .
            If the data is panel data, than yes, you should use xtreg and not reg, as the assumption of standard OLS of indepndnence between observations is violated. see more here: http://www.statalist.org/forums/foru...cts-estimation

            Comment

            Working...
            X