Announcement

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

  • encountering some problem when i wanted to run assumption test

    Hello everybody. Greeting from Indonesia. Im new a member here and i like to apologize if i have some bad english and my difinite word that i have.

    I want to ask some question
    Im new to stata and dont know much about it.. but learnt very much from youtube.

    but now i met some problem that i encounter when im using stata.
    the problem that i met is my panel data having some problem when i give command to run assumption test. like serial correlation using breuch-godfrey test. but instead the stata gave me an answer, they respond me with this:
    . estat bgodfrey, lag(1) estat bgodfrey not valid r(321);

    like wise when im run heteroscedasticity test:
    estat hettest not valid r(321);

    They could run at PLS/OLS but it couldnt at Fixed Effect or Random-Effect.

    Could you give me some answer for the problem that i met? What should i do? Many Thanks and best regards for your help

    note: im using stata 14.2.

  • #2
    Zdavir:
    welcome to the list.
    As per FAQ, please post what you typed and what Stata gave you back via CODE delimiters. Thanks.
    If you are concerned about heteroskedasticity/autocorrelation with panel dataset, you can robustifying/clustering your standard errors, as -xt- suite of commands does not support -estat hettest-.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hello, sir... thanks for willing to answer my question.

      When im type: ". xtreg z x1 x2 x3 x4 y1 y2 y3 y4, re",

      Then i type ". estat vif" for multicollinearity assumption test, Stata command then replied,
      "estat vif not valid
      r(321);"

      But when i type different like ". regress z x1 x2 x3 x4 y1 y2 y3 y4", stata could answer for any assumption test but didnt work for autocorrelation test(did i mention it right in english?). The Stata replied my command with this:
      ". estat bgodfrey, lag(24)
      sample may not include multiple panels
      r(459);"


      Sir, how can i robustifying/clustering my standard error?

      Thanks for your very kind reply and help

      Comment


      • #4
        Zdavir:
        try:
        Code:
        xtreg z x1 x2 x3 x4 y1 y2 y3 y4, re vce(cluster panelid)
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Let me add my welcome to Statalist to Carlo's welcome.

          To Carlo's advice let me add a word about the documentation. The commands you are having problems with are ones Stata calls "postestimation" commands because they are run after (post) an estimation command.

          The problem you describe in post #3 - estat vif will run after the regress command but not after the xtreg command - is caused by the fact that not every postestimation command is able to be run after every type of estimation. So while reading the output of help estat gives you an explanation of the estat vif postestimation command, you must look at help xtreg postestimation to see that estat vif is not included in the list of available postestimation commands for xtreg. We see from help regress postestimation that estat vif is avaiable after regress.

          With that said, let me give some advice about learning Stata. I'm sympathetic to you as a new user of Stata - it's a lot to learn. And with the documentation written in a language other than your primary language, I can imagine it seems imposting, and certainly YouTube videos can be helpful. But I'd like to recommend a path through the documentation that gets you a quick start and keeps the reading to a minimum.

          When I began using Stata in a serious way, I started, as have others here, by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. There are a lot of examples to copy and paste into Stata's do-file editor to run yourself, and better yet, to experiment with changing the options to see how the results change. Sample Stata code is the "universal language" for Stata users.

          All of these manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu. The objective in doing the reading was not to master Stata (many of us are still trying to master Stata, even after years of experience) as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax, and know how to find out more about them in the help files and PDF manuals.

          The Stata documentation is really exemplary - there's just a lot of it. The path I followed surfaces the things you need to know to get started and to work effectively.

          Best wishes!

          Comment


          • #6
            Hello, sir, glad to be back.

            Have found that what im looking for after reading adn searching in the internet

            1.Im using xtserial depvarname indepvarname for serial correlation test(assumption test).(and for this, how can i solve my serial correlation problem with what command?)

            2.but, sir, in the same time i couldnt do hettest with this command:

            . estat imtest, white
            estat imtest not valid
            r(321);

            . hettest
            last estimates not found
            r(301);

            This replied i had after im typing xtreg depvarname indepvarname, re

            3. And now found how to choose the best method using Hausman(using command: "hausman fixed" after storing both fixed and random) and Lagrange-Multiplier Test(using: xttest0), sir, but i dont know how to do Chow Test on my model.

            The stata command replied me with similiarly this(from what i recall):
            cannot do lrtest(once again from what i remember) because you using regress vs xtreg.



            Im sorry for asking too much question, sir, but im very glad and wanted to know more for using Stata because its have many advantage than other application like SPSS and Eviews that i use before.

            Many thanks

            Comment


            • #7
              I just wish to underline a couple of aspects:

              Please prefer to write Stata (not "stata").

              For the forthcoming queries, I kindly suggest to select an informative title,

              This is the most appropriate strategy to reach members and readers, who are really interested in the topic.

              For example, please avoid elusive terms in the title, such as"some problem" and "assumption test".

              Thank you,
              Best regards,

              Marcos

              Comment


              • #8
                Zdavir:
                - you do not say if you're dealing with a large N, small T panel dataset or the other way round;
                - as reported in some of the previous replies, -estat hettest- and -estat imtest- are not allowed after -xtreg-;
                - as far as Chow test is concerned, see http://www.stata.com/support/faqs/st...cs/chow-tests/. However, if your intent is to use Chow test to investigate whether your data can be pooled (POLS vs -xtreg-), you may want to consider that POLS outperforms -xtreg- only when the F-test at the foot of the -xtreg, fe- (with default standard errors) outcome table lacks statistical significance (as covered in -xtreg- entry, Stata .pdf manual).
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Here is the result, sir


                  sigma_u | 2.0849795
                  sigma_e | .30624138
                  rho | .97888192 (fraction of variance due to u_i)
                  ------------------------------------------------------------------------------
                  F test that all u_i=0: F(16, 368) = 346.81 Prob > F = 0.0000


                  Having found that f stat could show us that we coudl us fe or the pooled model. Can you describe me more easy for me so i can understand?

                  The link that you gave me its too difficult for me to read so im confused with the link.

                  Is there easy way to do command chow test without having rough time on the link, sir?

                  Thanks for you pretty much time

                  Comment


                  • #10
                    Zdavir:
                    - the F-test outcome tells you that -xtreg, fe- outperforms POLS;
                    - sorry I canniot be more helpful with Chow test.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      This text is on how to compute the Chow test statistic in Stata.

                      In the appendix of this thesis, you have an example of the Chow’s breakpoint test in panel data, which seems to be what you are specifically looking for..
                      Best regards,

                      Marcos

                      Comment


                      • #12
                        Originally posted by Carlo Lazzaro View Post
                        Zdavir:
                        - the F-test outcome tells you that -xtreg, fe- outperforms POLS;
                        - sorry I canniot be more helpful with Chow test.
                        thank you for your kind time to reply my message, sir.

                        can you tell me how to interprretate that why i should choose fixed than POLS with the result?

                        thank you for your kindness

                        Oh, yes, sir. My reseearch is about how do Indonesia perform on integration in ASEA so im using four dummy variables

                        im so excited to know the result, sir, the data i use is from 1992 to 2014.

                        Thanks for your time

                        Comment


                        • #13
                          Zdavir:
                          the significance of the F-test allows you to reject the null hypothesis that all the individual effects are 0, hence, POLS is outperformed by -xtreg, fe-.
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment


                          • #14
                            Zdavir, when people ask you to put CODE delimiters around Stata code (or output), this is what they are talking about (copied from the FAQ).

                            12.3 How to use CODE delimiters

                            Stata code (i.e. the exact commands issued) is very much easier to read if presented as such.

                            When you are editing an answer you should see a # button in the toolbar above the text area. Click on # to insert
                            Code:
                             and
                            mark-up. Write your code between, paying particular attention to linebreaks and indentation.

                            If you do not see that button, then click on the “Toggle Advanced Editor” button (an underlined A) in the area above to show the toolbar.

                            If you do not have access to the Advanced Editor in your interface, you can just insert those mark-ups manually before, or indeed after, you insert your code. Many people fast at typing do that any way.

                            Examples of your data (or of realistic similar datasets) are also much easier to read if presented as CODE. dataex, explained just above, automatically generates text including CODE delimiters, which can be copied and pasted into Statalist posts.

                            What is valuable with presenting code or data as CODE is that other members can easily copy and paste what you post to play with in their Stata installation.

                            Cheers,
                            Bruce
                            --
                            Bruce Weaver
                            Email: [email protected]
                            Version: Stata/MP 19.5 (Windows)

                            Comment


                            • #15
                              Originally posted by Carlo Lazzaro View Post
                              Zdavir:
                              the significance of the F-test allows you to reject the null hypothesis that all the individual effects are 0, hence, POLS is outperformed by -xtreg, fe-.

                              Thanks for your advice, sir. After having some problem and learnt about F-stat..my model shown me to use RE model instead OLS and FE model.
                              The command i use is this for testing which model is the best model for my research.
                              .xttest0 (Breusch-Pagan LM test)
                              .hausman fe re

                              After that, i wanted to run some assumption test...
                              Im using this command:
                              .estat vce(for multicollinearity test)
                              .xtserial depvarname indepvarname(Woolridge test for serial correlation).


                              But having some problem when im about to run heteroscedasticity test with "estat hettest" or "xttest3".

                              And now i found that xttest3 is for FE model. Is there hettest command for RE model, sir?

                              Thank you for your help and guide

                              Comment

                              Working...
                              X