Announcement

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

  • Wald test

    Hello,

    first I want to say that I don`t know how to change my name to add my full name. Maybe someone can tell me.

    Back to topic, I am ordered to make similar analysis like in a paper. The most things are working. But know I want to do a wald test as in the picture. You see a regression with some dummy coefficients like crisis oder other. Know I want to test the difference between team and single managed funds (team dummy 1 or 0) with various combinations of the coefficients like in the first raw of wald test: crisis =1 and cds = 0.

    I found out, that it`s possible to run a wald test after the regression by "test". But I am not sure how to do the same analysis like in the picture (to test the combinations).

    Is there anyone who can explain how I can run this?

    Thank you!


    Kind Regards
    Last edited by Christoph Hering; 27 Sep 2015, 09:02.

  • #2
    Hello Christoph,

    Please click on the "contact us" button (below to the right) so as to edit your name correctly.

    In order to perform Wald test after a regression, you may want to use either - test - or testparm - , depending on what you want to calculate.

    To see several examples, please type in the command window:

    Code:
    . help test
    Best,

    Marcos
    Best regards,

    Marcos

    Comment


    • #3
      Ok, message sent.

      I already tried to take a look at the manual of the test command but I have my problems with it. I don`t understand the syntax in my context that`s why I have tried to explain the regression at the picture. Can you help me?

      Regards

      Comment


      • #4
        From the information you've given, wouldn't the following commands reproduce the same Wald test statistics?

        Code:
        test Crisis
        test CDS
        test Crisis*CDS
        I'm afraid your screenshot alone doesn't provide adequate information to help you further than this; would it be possible if you could elaborate on your original query and display what you have tried up to this point?

        Comment


        • #5
          Please...

          Comment


          • #6
            Do you happen to have the data that created that table? That would make it easier to explain. But I think you could do this with either test or lincom. Basically, the two groups will differ on their value on team. They will also differ on the value of team*whatever when whatever does not equal 0. So, for your 3 tests, I think it is something like

            test team + team*crisis = 0
            test team + team*cds = 0
            test team + team*crisis + team*cds + team*cds*crisis = 0

            Or, I think you could do something like

            lincom team + team*crisis
            lincom team + team*cds
            lincom team + team*crisis + team*cds + team*cds*crisis

            You'll have to use the actual names for the terms. If you add the -coefl- option when running the estimation command, that will make it easier to get the syntax right.

            If you don't have the data that created the table, then if you show what you have done then we can probably show you how to do the tests. If these variables are all dichotomies, then it should be something like

            reg y i.team i.cds i.crisis i.team#i.cds i.team#i.crisis i.cds#i.crisis i.team#i.cds#i.crisis, coefl
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Here is a mockup of what I think it should look like. The lincom approach is what would come closest to cloning your photo.

              Code:
              webuse lbw, clear
              clonevar crisis = low
              clonevar cds = smoke
              clonevar team = ui
              reg age i.crisis i.cds i.team i.team#i.crisis i.cds#i.crisis i.cds#i.team i.cds#i.crisis#i.team, coefl
              test 1.team + 1.team#1.crisis = 0
              lincom 1.team + 1.team#1.crisis
              test 1.team + 1.team#1.cds = 0
              lincom 1.team + 1.team#1.cds
              test 1.team + 1.team#1.crisis + 1.cds#1.team + 1.cds#1.crisis#1.team = 0
              lincom 1.team + 1.team#1.crisis + 1.cds#1.team + 1.cds#1.crisis#1.team
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

              EMAIL: [email protected]
              WWW: https://www3.nd.edu/~rwilliam

              Comment


              • #8
                Hi Richard,

                that looks good. Now I understand the syntax better than before. So my last problem is, how do I get the result like in the table? In the text they are talking about how many basis points does each combination (e.g. team + team_crisis) outperform or underperform the single managed funds.

                I don`t have the same data like in the table because I have to analyse same things but with interest rate futures. To show you what I am doing I will show you the code and the result:

                Code:
                        reg std crisis interest_futures_engaged team crisis_team future_crisis future_team future_crisis_team tna age_months expense_ratio turnover_ratio institutional_investor m_fund_flow net_cash_ratio lipperclass1-lipperclass4, vce(cluster crsp_portno)
                
                test team + crisis_team = 0
                The regression shows the dependent variable standard deviation and from crisis until future_crisis_team the independent ones we want to interpret. The ones later are control variables and not of primary interest. Then you can see the wald test.

                The result of the wald test is:


                F( 1, 207) = 0.76
                Prob > F = 0.3836

                So now I have the significance, right? How can I get the influence on the standard deviation for example like in the picture?

                In the help manual I can see there is a ",coef" option would this help?


                Thank you!
                Last edited by Christoph Hering; 28 Sep 2015, 03:35.

                Comment


                • #9
                  Cristoph:
                  with Prob>F=0.3836 you do not have the signicance at the arbitrariliy cut-off of 0.05 (whatever that means for your research purposes).
                  Put differently, you can not reject the null that team + crisis_team coefficients=0.
                  Kind regards,
                  Carlo
                  (StataNow 18.5)

                  Comment


                  • #10
                    So, sorry if I am wrong but how can I get the significance and the influence on the standard deviation (dependent variable of the regression) in an other way? You just tell me that this is not the significance if I understand your answer correctly.

                    Here you can find the paper I am talking about:

                    http://papers.ssrn.com/sol3/papers.c...act_id=1744978

                    On page 17/18 you can see analyses on table 5 and on page 31/32 you can find the table I am talking about.
                    Last edited by Christoph Hering; 28 Sep 2015, 04:33.

                    Comment


                    • #11
                      Cristoph:
                      yes, you're right: I told you only that your -test- did not get statistical significance (which is a result as interesting as the opposite).
                      There's no such a tool like a statistical procedure that can give you the significance of whatever you're after without respecting some requirements (sample size, just to quote the first that springs to my mind).
                      The sample size reported in Table 5 of the paper you mentioned reaches 7,624 observations: is yours in line with that magnitude?
                      Kind regards,
                      Carlo
                      (StataNow 18.5)

                      Comment


                      • #12
                        I have a bit more than them. In my analysis I have 14795 observations. For now, I understand what the test tells me in the paper but for me it`s not clear how to test and find out the results with stata for my data.

                        Kind Regards

                        Comment


                        • #13
                          I think the lincom already gives you the same info as was in your table. For example,

                          Code:
                          . lincom 1.team + 1.team#1.crisis
                          
                           ( 1)  1.team + 1.team#1.crisis = 0
                          
                          ------------------------------------------------------------------------------
                                   age |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                          -------------+----------------------------------------------------------------
                                   (1) |   1.402597   2.292253     0.61   0.541    -3.120377    5.925572
                          ------------------------------------------------------------------------------
                          The coefficient, 1.402597, corresponds to the -0.0022 in your first Wald test. Just add up the coefficients for 1.team and 1.team#1.crisis. The P value tells you whether that value is significantly different from 0. I haven't read through the paper but if the goal is just to replicate what was in that one photo you already have what you need.
                          -------------------------------------------
                          Richard Williams, Notre Dame Dept of Sociology
                          StataNow Version: 19.5 MP (2 processor)

                          EMAIL: [email protected]
                          WWW: https://www3.nd.edu/~rwilliam

                          Comment


                          • #14
                            That looks great! But is this the wald test? I thought only the command "test" is running a wald test. Thanks.

                            The goal is to do a wald test like in the picture but in my case I have to analyse interest rate future instead of CDS. But the other things are the same. So if lincom gives me a wald test this would be a great solution.

                            Kind Regards
                            Last edited by Christoph Hering; 28 Sep 2015, 08:58.

                            Comment


                            • #15
                              If you compare the results from the test commands and the lincom commands, you see that the p values are the same. Further, the t-values from lincom, when squared, are the F values from the test command. It is just different ways of getting the same info.But lincom gives you the differences between the two groups which is what your table presented so lincom is what will give you the cloning of that table.

                              Code:
                              . test 1.team + 1.team#1.crisis = 0
                              
                               ( 1)  1.team + 1.team#1.crisis = 0
                              
                                     F(  1,   181) =    0.37
                                          Prob > F =    0.5414
                              
                              . 
                              . lincom 1.team + 1.team#1.crisis
                              
                               ( 1)  1.team + 1.team#1.crisis = 0
                              
                              ------------------------------------------------------------------------------
                                       age |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       (1) |   1.402597   2.292253     0.61   0.541    -3.120377    5.925572
                              ------------------------------------------------------------------------------
                              -------------------------------------------
                              Richard Williams, Notre Dame Dept of Sociology
                              StataNow Version: 19.5 MP (2 processor)

                              EMAIL: [email protected]
                              WWW: https://www3.nd.edu/~rwilliam

                              Comment

                              Working...
                              X