Announcement

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

  • boottest error

    I am trying to use boottest from SCC and I get error r(3001):
    Code:
    . which boottest
    C:\Users\Martyn\OneDrive\ado\plus\b\boottest.ado
    *! boottest 1.1.6 29 February 2016
    *! Copyright (C) 2015-16 David Roodman . use http://web.archive.org/web/20150802214527/http://faculty.econ.ucdavis.edu/~dlmiller/statafiles/collapsed
       
      . regress hasinsurance selfemployed post post_self, cluster(year)
       
      Linear regression                               Number of obs     =         16
                                                    F(3, 7)           =     531.32
                                                    Prob > F          =     0.0000
                                                    R-squared         =     0.9863
                                                    Root MSE          =     .00945
       
                                         (Std. Err. adjusted for 8 clusters in year)
    ------------------------------------------------------------------------------
                 |               Robust
    hasinsurance |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    selfemployed |  -.1567677   .0046412   -33.78   0.000    -.1677423   -.1457931
            post |  -.0206586   .0037009    -5.58   0.001    -.0294098   -.0119075
       post_self |   .0548578   .0073574     7.46   0.000     .0374602    .0722553
           _cons |   .8740288    .001679   520.55   0.000     .8700585    .8779991
    ------------------------------------------------------------------------------
       
      . constraint 1 post_self=.04
       
      . boottest
       
      (h0(1) assumed)
            boottest_stata():  3001  expected 23 arguments but received 24
                     <istmt>:     -  function returned error
    r(3001);
    Any suggestions as to what I am doing wrong?

    ​I am running Stata 14.1 IC (03 Mar 2016) and Windows 10 64 bit Build 14279.

    Cheers,
    Martyn

  • #2
    I'm also facing the same problem as martyn!

    Comment


    • #3
      The program was updated around 10 minutes ago (well, ok, 2 days):

      Code:
      . which boottest
      c:\ado\plus\b\boottest.ado
      *! boottest 1.2.0 2 April 2016
      *! Copyright (C) 2015-16 David Roodman
      Maybe David just fixed the problem so download it and see.

      Incidentally, when I encounter a problem, before reporting I always do -update all- and -adoupdate-. If you are lucky the problem will have already been fixed.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 18.5 MP (2 processor)

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

      Comment


      • #4
        Thanks Richard! The problem persists even after -update all- and -adoupdate-. This is the error message:
        boottest_stata(): 3001 expected 24 arguments but received 27
        <istmt>: - function returned error

        Comment


        • #5
          Try running the examples in the help file and see if they work. I just did and everything ran fine, including the example in the original post. If they don't work for you then that suggests some problem in your setup.

          If Martyn is still following this thread maybe he can comment on whether or not he figured out what the problem was.

          Showing us your code (use code tags) may help. Better yet would be a replicable example. Since i can't replicate the original problem I suspect the problem is somewhere on your end but maybe not.

          Finally, I very much like the user-written whichpkg, available from SSC. It gives you info on all the files in a package, not just the main program. See how your results compare to this:

          Code:
          . whichpkg boottest
          All instances on search path of components of package boottest.pkg:
          
          c:\ado\plus\b\boottest.ado
          *! boottest 1.2.0 2 April 2016
          *! Copyright (C) 2015-16 David Roodman
          
          c:\ado\plus\b\boottest.mata
          *! boottest 1.2.0 2 April 2016
          *! Copyright (C) 2015-16 David Roodman
          
          c:\ado\plus\b\boottest.sthlp
          {* *! version 1.2.0 2 April 2016}{...}
          
          c:\ado\plus\s\scoretest.ado
          *! scoretest 1.1.0 19 December 2015
          *! Copyright (C) 2015 David Roodman
          
          c:\ado\plus\w\waldtest.ado
          *! waldtest 1.1.0 19 December 2015
          *! Copyright (C) 2015 David Roodman
          
          c:\ado\plus\lboottest.mlib
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 18.5 MP (2 processor)

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

          Comment


          • #6
            I run the examples in the help file, the same problem and the same error message.

            whickpkg boottest also provides identical list like yours. Not sure what is going wrong??

            Code:
            . whichpkg boottest
            All instances on search path of components of package boottest.pkg:
            
            C:\myfiles\ado\plus\b\boottest.ado
            *! boottest 1.2.0 2 April 2016
            *! Copyright (C) 2015-16 David Roodman
            
            C:\myfiles\ado\plus\b\boottest.mata
            *! boottest 1.2.0 2 April 2016
            *! Copyright (C) 2015-16 David Roodman
            
            C:\myfiles\ado\plus\b\boottest.sthlp
            {* *! version 1.2.0 2 April 2016}{...}
            
            C:\myfiles\ado\plus\s\scoretest.ado
            *! scoretest 1.1.0 19 December 2015
            *! Copyright (C) 2015 David Roodman
            
            C:\myfiles\ado\plus\w\waldtest.ado
            *! waldtest 1.1.0 19 December 2015
            *! Copyright (C) 2015 David Roodman
            
            C:\myfiles\ado\plus\lboottest.mlib
            
            C:\myfiles\ado\plus\l\lboottest.mlib

            Comment


            • #7
              What version of Stata do you have?
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 18.5 MP (2 processor)

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

              Comment


              • #8
                I am using the same version as Richard is, on a Macbook, and it works fine. Can you check what version you're using again. If you have a different version than ours, and since you've said that you've used adoupdate, I would suggest you uninstall boottest and install it again.
                Alfonso Sanchez-Penalver

                Comment


                • #9
                  Actually, I notice that the whichpkg listings are not exactly identical. Both of us have c:\ado\plus\lboottest.mlib, but Bereket also has C:\myfiles\ado\plus\l\lboottest.mlib. If the two files are not identical and the wrong one is being executed. that could explain the problem. I am not sure why this would happen -- and indeed, I don't understand why my version is not in C:\myfiles\ado\plus\l\lboottest.mlib -- but in any event I agree with Alfonso's advice to uninstall and reinstall, adding that I would make sure that both versions of lboottest.mlib got deleted after the uninstall.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 18.5 MP (2 processor)

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

                  Comment


                  • #10
                    Thanks Alfonso and Richard! I'm using Stata 14.1. I uninstalled and installed boottest as advised. When I run the examples in the help file, I get the following error message:

                    Code:
                    . boottest
                                     &lt;istmt&gt;:  3499  boottestStataVersion() not found
                    When I make the following corrections David Roodman suggested in the boottest ado file on 28 February,

                    [CODE]
                    mata st_local("mlibversion", boottestCompileVersion())
                    if `mlibversion' != c(stata_version) {
                    cap findfile "lboottest.mlib"
                    while !_rc {
                    erase "`r(fn)'"
                    cap findfile "lboottest.mlib"
                    }
                    qui findfile "boottest.mata"
                    run "`r(fn)'"
                    }
                    [CODE]

                    I get the following error message:

                    Code:
                    . boottest
                    
                    (h0(1) assumed)
                            boottest_stata():  3001  expected 24 arguments but received 27
                                     <istmt>:     -  function returned error
                    r(3001);

                    Comment


                    • #11
                      Richard, you're right; the additional 'C:\myfiles\ado\plus\lboottest.mlib' file was the problem (not sure how that was installed!) - now it is working smoothly when I delete the file. Richard, you've very sharp eyes :-) Thanks again both!

                      Comment


                      • #12
                        Very sorry for this trouble. The root of the problem is that I want the program to use a Mata function called panelsum(), when available--it was introduced in Stata 13--while still being compatible with older Stata versions. The function makes the program a lot faster. But this has proved surprisingly difficult to get right. And a deep cause of that is that Stata does not have an interest in facilitating the writing of packages that work as well for old versions of Stata.

                        ** The best response is to delete all copies of lboottest.mlib on your computer and then reinstall. I am hopeful that this is only a transitional problem and that newer versions of boottest won't create this problem.

                        --David

                        Comment


                        • #13
                          Thanks David. I just followed my own advice. I uninstalled, made sure all versions of lboottest.mlib were gone, and reinstalled. Now the file is stored in c:\ado\plus\l\lboottest.mlib, which is what I would expect.
                          -------------------------------------------
                          Richard Williams, Notre Dame Dept of Sociology
                          StataNow Version: 18.5 MP (2 processor)

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

                          Comment


                          • #14
                            Dear Dr. Roodman,

                            I am a PhD student at Paris School of Economics and I am trying to use your Stata command “boottest”. Each time I try to run a regression using IV and then the boottest command I get the following. For example:

                            webuse nlsw88
                            ivregress 2sls wage ttl_exp collgrad (tenure = union), cluster(industry)
                            boottest tenure, nograph

                            variable __000007 not found
                            st_data(): 3500 invalid Stata variable name
                            _boottest_st_view(): - function returned error
                            boottest_stata(): - function returned error
                            <istmt>: - function returned error

                            What could be the problem with this estimation? I have uninstalled and reinstalled Stata to see if I could solve the problem, but no change.

                            Thank you,

                            Comment


                            • #15
                              Originally posted by David Roodman View Post
                              Very sorry for this trouble. The root of the problem is that I want the program to use a Mata function called panelsum(), when available--it was introduced in Stata 13--while still being compatible with older Stata versions. The function makes the program a lot faster. But this has proved surprisingly difficult to get right. And a deep cause of that is that Stata does not have an interest in facilitating the writing of packages that work as well for old versions of Stata.

                              ** The best response is to delete all copies of lboottest.mlib on your computer and then reinstall. I am hopeful that this is only a transitional problem and that newer versions of boottest won't create this problem.

                              --David
                              Dear David,
                              I have recently updated boottest, but this new version return an error message:

                              boottest_stata(): 3001 expected 57 arguments but received 58
                              <istmt>: - function returned error

                              Is there a way to go back to older version or fix this problem?

                              I updated to this new version because I could not obtain madjust(boneferroni) adjusted P values from return list from the older version. Unfortunately, this version does not work.
                              I try the solutions you have suggested years ago, but the problem persists.

                              Comment

                              Working...
                              X