Announcement

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

  • Traj command unrecognized

    Hi,
    I'm a master's student that is a beginner in Stata.

    I'm working on an offline server at my university, which does not connect to the internet. Therefore, I can't download any plug-ins directly. I downloaded the traj plug-in on my personal computer and imported the .ado and .hlp files to my offline server. I then used sysdir and sysdir set PLUS "directory where the .ado and .hlp files are". When I use the traj command I get an error that says command unrecognized.

    Below are screenshots of the .ado and .hlp files as well as my command.

    How can I fix this?

    Thank you in advance!
    Click image for larger version

Name:	Screenshot 2025-02-04 at 20.42.05.png
Views:	1
Size:	71.8 KB
ID:	1772119

    Click image for larger version

Name:	Screenshot 2025-02-04 at 20.41.51.png
Views:	1
Size:	42.6 KB
ID:	1772120

  • #2
    Can you confirm the folder in which all the files in your screenshot are located? If they are in one of the folders listed above, such as N:\durable... , they should be automatically found. Are they somewhere else?

    Comment


    • #3
      The folder I have it on is the N: \durable\file-import\p1111-thienkit-group\.

      Comment


      • #4
        Ah then I am not sure why Stata is unable to find the file. Have you tried restarting Stata?

        Comment


        • #5
          Yes I have. It is quite weird. I will have to look for the problem again once I have stepped away from it a little bit. Do you think it has something to do that it is an offline server?

          Comment


          • #6
            I think you'd better put traj.ado traj.plugin trajstart.ado......into C:\Users\p1111-thienkit\ado\personal\

            Comment


            • #7
              I for some reason cannot find that folder?

              Comment


              • #8
                see
                Code:
                help adopath
                ado files need to be on the path or in the current working directory

                Comment


                • #9
                  Please show us the output of
                  Code:
                  adopath
                  (cross-posted with #8)

                  Comment


                  • #10
                    Click image for larger version

Name:	Screenshot 2025-02-05 at 11.10.31.png
Views:	1
Size:	34.4 KB
ID:	1772181


                    Thank you for your responses! This is what pops up when I run adopath.

                    Comment


                    • #11
                      Hm, so Stata knows it needs to look into the N:\durable.. folder to look for those files. Perhaps Stata does not have read permissions on that folder, or that folder is inaccessible (disconnected?) when Stata is running. If it is connected and accessible, try changing the folder permissions?

                      Comment


                      • #12
                        Thank you for the input! I can't see where it says if it's connected or not. Tried searching how to do this online, but couldn't find anything. Can you elaborate please?

                        Comment


                        • #13
                          In addition to helpful comments to date, here are some extra notes that are my understanding. Let's emphasise that you need write access to any place you ask Stata to install stuff.

                          1. adopath by default suggests places where Stata is willing to look for code, help and other files, It should echo where Stata is installed -- or where the OS tells you to think Stata is installed, which can be subtly different on a network. But in the case of PLUS and PERSONAL it just suggests places where files might suitably go, but does not imply that they yet exist. The difference between PERSONAL and PLUS is that PERSONAL is under your control but PLUS is where Stata will install downloaded community-contributed software, unless you insist otherwise. Nothing on Stata's part, however, stops you putting files in either place independently.

                          2. You can add or subtract places to extend or contract your adopath. It would be a very bad idea to tell Stata not to look for its own files -- that should be obvious -- but what can bite too is that Stata doesn't check on receiving a change to adopath that a filepath corresponds to anywhere your computer can see now, or even that it's a legal pathname. I've seen bizarre errors where students get upset because Stata tells them that directories don't exist or that files can't be found, but it goes back to specifying an incorrect or illegal filepath.

                          Whimsically put, an adopath change includes promises for the future, and is not checked for facts about the present.



                          Comment

                          Working...
                          X