Announcement

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

  • Club clustering pfilter, logtreg and psecta

    Dear all,

    I am currently trying to perform a club cluster convergence analysis (STATA15 SE) using the method as used in https://sites.google.com/site/kerryd...me/stata-files
    However, reproducing the example STATA doesn't recognized the commands pfilter, psecta, and logtreg.

    You are supposed to install some additional packages. So I figured out that I needed to install hprescott and moremata.
    However, it still doesn't recognized the command.

    Is there someone here who has the same problem? Or could help me out by trying the reproduce the example.
    Is there a certain order in stata to install, xtset, or perform any commands at all in order to let this work?

    Thanks in advance.

    Kind regards

  • #2
    From the link you gave, did you download the zip archive file "Econometric_convergence_test_and_club_clustering_ using_Stata.zip", extract the contents, and copy them into the appropriate Stata directories?

    Comment


    • #3
      Yes I think so. I also changed the directory before trying to figure it out again.

      Does it matter where the ado files are installed?
      Or can there be an error in the working directories?

      Comment


      • #4
        I was finally able to reproduce the example. Therefore I moved on to my own data to try and do exactly the same thing again, in exactly the same order.
        However, I got the error message unrecognized command again.. What can the problem be?

        Comment


        • #5
          The problem is most likely that you do not have the files installed one of the the proper directories for Stata to always find them and recognize the commands. This is not a surprise because the author has not prepared them as a package for Stata to install. (Once the paper is published in Stata Journal, they commands will be available to install via Stata.)

          For now I suggest you run the sysdir command, note the directory listed as PERSONAL, and copy all the files to that location.

          Comment


          • #6
            Thank you so much. It partly worked for my own data now

            The part with the pfilter and logtreg functioned.

            Unfortunately, the psecta command didn't work yet.
            With the this command: psecta lngva2, name( REG_NAME ) kq(0.333) gen(club) noprt
            I got the this message: matsize too small to create a [402,2] matrix

            My data compared to the example is:
            My dataset: 402 regions for 15 years
            Example: 152 regions for 34 years

            Is my problem the height of the kq(0.333)?
            Or could it be the way the data is sorted/structured?

            I want to create clubs based on Gross Value added. I want to create those first and therefore didn't add the explanatory variables yet.


            Comment


            • #7
              I note that at the location you cited in post #1 the author writes

              If you find any problem when using these codes. Pls contact me.
              Kerry Du [kerrydu1986 at gmail.com] [kerrydu at sdu.edu.cn]
              That may be your best hope for getting assistance with the actual use of software that accompanies a paper that has yet to be published.

              Added in edit: I see now that​​​ ​Kerry Du is a Statalist member who perhaps will see this topic in light of this reference.
              Last edited by William Lisowski; 03 Dec 2017, 13:12.

              Comment


              • #8
                William Lisowski Thank you so much. In the end the solution was easier than expected.

                I managed to figure it out thanks to you. The ado files weren't in the right place, so that was the first step.
                Afterwards, I needed to change the matrix size, after which the psecta command also functioned.

                Comment


                • #9
                  Hi all,

                  I managed to create the clubs, now I'm wondering if it is possible to merge clubs 2 times for example.
                  In the manual the club clustering is done with a combination of schmeckmerge and imerge in Stata.

                  Unfortunately, after trying to perform the similar commands again, creating e.g. finalclubs2, it is stated that no clubs can be merged.
                  Is this because after calculations Stata doesn't find evidence for merging more clubs?
                  Or is this because the method is not suitable to create a so-called second round of club clustering?

                  Kerry Du, so I was wondering if it is possible to do this.

                  Thanks in advance,

                  Kind regards

                  Comment


                  • #10
                    Hi All,
                    i have tried to replicate the result using the data provided by Kerui Du.
                    Unfortunately the command pfilter lnpgdpm method(hp) trend(lnpgdp2) smooth(400)returns insufficient observation.
                    can you suggest where i am going wrong?

                    Thanks in advance
                    with regards
                    Last edited by Subhasis Bera; 29 May 2018, 04:31.

                    Comment


                    • #11
                      Hi all,
                      i tried using psecta command as follows
                      psecta lgdppc22, kq(0.3) gen(club)

                      which resulted in an error

                      _vecdiff(): 3499 mm_which() not found
                      _findclub(): - function returned error
                      _getcluster(): - function returned error
                      <istmt> - function returned error
                      r(3499);

                      can someone help me with how resolving this? Kerry Du

                      Thanks

                      Comment


                      • #12
                        To diana wright,

                        I had the same problem and the solution for me was actualy mentioned in the author description for the package instalation:

                        The package depends on the Mata function
                        mm_which(). If not already installed, you can
                        install it by typing ssc install moremata.
                        Stata 12.1 or later is required.

                        so after moremata instalation it all worked fine.

                        Hope it helps.

                        Comment


                        • #13
                          Hi, I am alos trying to go through Du's example of Phillips and Sul (2007) and have downloaded the Mata function but am still receiving "command pfilter unrecognised"
                          Last edited by Alexander Le Grys; 07 Jan 2020, 11:41.

                          Comment


                          • #14


                            So, EITHER you haven’t installed pfilter yet (use your operating system to tell you whether it’s visible on your machine)

                            OR it’s in a place where Stata can’t see it.


                            Typing

                            Code:
                            adopath
                            will show you where Stata will look. See also the help for that command.

                            Comment


                            • #15
                              Thank you very much Dr Cox! Correct it was not saved in a file that Stata would find through the adopath options and hence I went down the sysdir set PLUS route with my 'StataPackages' file.
                              Last edited by Alexander Le Grys; 08 Jan 2020, 05:21.

                              Comment

                              Working...
                              X