Announcement

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

  • Failing to install the data files for zanthro in stata 14.0

    I have used the commands below to install the Zanthro but the ancilliary data files have failed to download.
    . net install dm0004_1
    checking dm0004_1 consistency and verifying not already installed...
    installing into c:\ado\plus\...
    installation complete.

    . net get dm0004_1
    checking dm0004_1 consistency and verifying not already installed...
    cannot write in directory
    r(603);

    The current directory is
    pwd
    C:\Windows\System32
    but even when I change it,

    cd "C:\Program Files (x86)"
    it returns

    . net get dm0004_1
    checking dm0004_1 consistency and verifying not already installed...
    cannot write in directory
    r(603);

  • #2
    Welcome to Statalist.

    Neither of the directories you show are user directories that you can write to, and in any event, neither is an appropriate directory to download Stata data files into. You need to change your current directory to one of your directories. I'm not a windows user, but it would be something like
    Code:
    C:\Users\john\
    if my memory serves me well.

    For what you are doing, I would do something like
    Code:
    cd C:\Users\john\
    mkdir zanthro
    cd zanthro
    net get dm0004_1
    at which point the data will be installed in the zanthro directory.

    Comment


    • #3
      William is right in his diagnosis of the problem, but wrong in his cure. If you put those files in c:\Users\john, they may install without an error message, but when you try to use zanthro, it will complain that it can't find them. The zanthro routines expect to find the various lookup tables they use in c:\ado\plus\z on a Windows setup.

      Comment


      • #4
        Clyde Schechter --

        As a non-user of zanthro I bow to your greater familiarity with it. Here is a deeper dive into the advice I gave.

        When I look at _gzanthro.ado I see that it uses findfile to locate the input file it needs. To do this, findfile searches the path in c(adopath) and that includes the current working directory. So if the user is then working within the same directory that the files have been downloaded to, the file will be found.

        The paragraph above is predicated on installing dm0004_1. I note that for the original version, dm0004, the lookup tables were included by net install and did not require separate net get command, and would have been installed as you suggested. Why this was cast aside for dm0004_1 is not stated in its documentation. The Stata Journal article that accompanied the dm0004_1 update makes to reference to this change.

        So the most general solution, with dm0004_1, is to move the net get files into the user's Stata PLUS directory as you suggest, but doing so requires a certain amount of fiddling about on the part of the user, messing about in directories that they do not normally mess about in. I note also that the documentation for zanthro makes no reference to this sort of installation. So my thought is that for whatever reason, the authors now expect the users to copy the reference files they need from directory to directory with their work.

        Comment


        • #5
          What William says is correct. Placing them in the current working directory will make them available to -zanthro-.

          The problem with that is the current working directory typically changes from project to project, so you will be constantly either cluttering up your hard drive with multiple copies of the same files in different places, or having to move them around with each new project (and thereby breaking the code in the earlier projects). So I think the more effective solution is to place them in an unchanging part of the adopath.

          Comment


          • #6
            i have tried the commands
            cd C:\Users\john\
            C:\Users\john

            .
            . mkdir zanthro

            .
            . cd zanthro
            C:\Users\john\zanthro

            . net get dm0004_1
            this is the report i get.Thanks
            file http://www.stata.com/dm0004_1.pkg not found
            could not load dm0004_1.pkg from http://www.stata.com/
            r(601);
            still no progress.Thanks for the assisance.

            Comment


            • #7
              Try
              Code:
              net get dm0004_1, from(http://www.stata-journal.com/software/sj13-2/)
              I think if the net get is run right after the net install, the "from" is set properly, but running net get after some time has elapsed may have led to this problem.

              Comment


              • #8
                still stuck ,no progress
                net get dm0004_1
                file http://www.stata.com/dm0004_1.pkg not found
                could not load dm0004_1.pkg from http://www.stata.com/
                r(601);

                Comment


                • #9
                  The command you show in post #8 is not the command I suggest in post #7. To be clear, try this, given that you have already created the zanthro directory at the path shown.
                  Code:
                  cd C:\Users\john\zanthro
                  net get dm0004_1, from(http://www.stata-journal.com/software/sj13-2/)

                  Comment


                  • #10
                    Originally posted by Clyde Schechter View Post
                    What William says is correct. Placing them in the current working directory will make them available to -zanthro-.

                    The problem with that is the current working directory typically changes from project to project, so you will be constantly either cluttering up your hard drive with multiple copies of the same files in different places, or having to move them around with each new project (and thereby breaking the code in the earlier projects). So I think the more effective solution is to place them in an unchanging part of the adopath.
                    So Clyde, how can i change the path to the current directory

                    Comment


                    • #11
                      If you have read and understood the comment you quoted, you would not be wondering how to change the path to the current directory. You would be forgetting about the current directory and putting the -zanthro- files in c:\users\ado\plus\z.

                      If, nevertheless, you want to modify the adopath to include your current working directory, the -adopath- command will oblige you. -help adopath- (look for adopath +). I don't think it's a good idea to do this, but you pays your money and you makes your choice, as they say.

                      Comment


                      • #12
                        Originally posted by William Lisowski View Post
                        The command you show in post #8 is not the command I suggest in post #7. To be clear, try this, given that you have already created the zanthro directory at the path shown.
                        Code:
                        cd C:\Users\john\zanthro
                        net get dm0004_1, from(http://www.stata-journal.com/software/sj13-2/)
                        This one worked.Thanks for the assistance.

                        Comment


                        • #13
                          thanks the ancilliary files finally installed

                          Comment


                          • #14
                            The folk at Stata Journal have fixed this. The growth reference .dta files are now included in the installation.

                            Comment

                            Working...
                            X