Announcement

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

  • help with r(601): file_____ not found

    Dear all,

    After relocating my data file, I wasn't able to execute some "egen" commands. Using both mac and pc interchangeably to deal with the data as well- would this create such issue for the egen file? Or would it be other reasons?

    Thanks for your help in advance!

  • #2
    Vivian:
    surely you have already checked that:
    - file name and directory are not mistyped in your code;
    - the invoked file is actually stored in the directory you expect it to be.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Carlo, thanks for the kind response. I'm elementary to the software program (and stats program in general)..how do I check if the invoked file is stored in the expected directory?

      This is what I got:
      egen haz=zanthro(height, ha, WHO), xvar(age) gender(gender) gencode(male=1, female=2) ageunit(year)
      file "zlhagewho.dta" not found
      r(601);

      .
      . egen waz=zanthro(weight, wa, WHO), xvar(age) gender(gender) gencode(male=1, female=2) ageunit(year)
      file "zwtagewho.dta" not found
      r(601);

      .
      . egen bmiiotfz=zbmicat(bmi), xvar(age) gender(gender) gencode(male=1, female=2) ageunit(year)
      file "zbmicat.dta" not found
      r(601);

      Comment


      • #4
        Vivian:

        This is most likely because the file "zbmicat.dta" is not in your working directory.

        Type cd to see your directory....

        Comment


        • #5
          Navid is I think correct. You must download that data file too to work with that program.

          Comment


          • #6
            I've never used this package but why are the datasets not part of the installation files if they are required for the program to run?

            Comment


            • #7
              Code:
               
              net sj 13-2 dm0004_1
              shows the files. Standard Stata logic is to segregate ado and sthlp files from others, which usually are needed only to run examples. But in this case some of the other files are essential.

              Robert has a good point, which we [Stata Journal personnel] will pursue with the authors.

              Comment


              • #8
                The data set are part of the installation files (although the link to download them is an extra step after the link to install the -zanthro()- -egen- function.) It may be that Vivian Wang skipped that step. But that is unlikely, because then -zanthro- would never have worked.

                Another possibility is that she did that step, and ended up installing them in her current working directory at that time. When you invoke -egen, zanthro()- it uses -findfile- to locate the necessary data files. And -findfile- looks along the adopath and nowhere else. She states that her problem began when she changed the location of her data file. If, like me, she typically launches Stata by double-clicking on a data file, then she will have changed her working directory (which is part of the adopath). Having left those data files where they were originally downloaded, -zanthro- will no longer find them.

                My advice to Vivian is to inspect the directory where the data file had been previously, when things were working. She will probably find all those -zanthro- related data files there. She needs to move them into an unchanging part of the adopath. Putting them with _zanthro.ado itself in C:/ado/plus/_ (in Windows) is probably the most sensible place. Then they will be available whenever she uses -zanthro-, regardless of her working directory at the time.

                Comment


                • #9
                  Clyde, in Stata package terminology, installation files are "files that you type net install to install and that are required to make the addition work" while ancillary files are "additional files that you might want to install—you type net get to install them— but that you can ignore" (see http://www.stata.com/manuals13/rnet.pdf). Since the datasets are not optional and must be installed for the program to work, they should be part of the installation files.

                  Comment


                  • #10
                    Robert,

                    OK, I stand corrected. Since I don't write programs for public use, I haven't dealt with these issues and didn't know the terminology. Thanks for clarifying this.

                    Still, I have high confidence that, terminology aside, my diagnosis of Vivian's problem is correct and that my proposed solution will work.

                    By the way, there is one technicality here: -zanthro- will do these calculations for several different anthropometric variables, and several different established norms (US, UK, WHO, CDC). For -zanthro- to work, you only need the data sets that are relevant to the particular variables and norms you want calculations for. So, technically, each of these files is optional--though you must have the particular ones needed for any given application. I'm not sure whether that makes them installation files or ancillary files. Although the simplest thing would be to just get them all at the outset, given how many of these files there are, a user might reasonably choose to not clutter up his/her hard drive with those he/she is pretty sure won't be needed in his/her work.

                    Comment


                    • #11
                      1. Just note that this has been already asked before:
                      http://www.statalist.org/forums/foru...ot-found-error

                      2. Also note that distributing files for different operating systems is a pain. StataCorp's recommendation is to mark platform-specific files correspondingly, which is ok, but then if all the files are marked as such, the user is left with impenetrable message "Nothing to install" for platform-specific modules, instead of at least a message that the module is available for such and such platform, and at least install the help file anyway.

                      3. Finally, the word ancillary is not the most common word for non-native speakers. In fact this is the only context I've ever encountered it in practice
                      Not surprisingly for it:
                      Indication of the number of years of formal education that a person requires in order to easily understand the text on the first reading
                      Gunning Fog index : 40.40
                      (with negative Flesch Reading Ease!).

                      Perhaps additional, supplementary, example, or something else can be a more user-friendly term, which can also enlighten the reader about the purpose of the file.
                      As much of the ancillary files are examples, having a separate "example" group would be great.

                      Best, Sergiy Radyakin

                      Comment


                      • #12
                        Dear all, thanks a lot for your help! I eventually uninstalled and reinstalled the egen, which resolved my problem.

                        Regards, Vivian

                        Comment

                        Working...
                        X