Announcement

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

  • No Stata Format with file.dta

    Dear all,

    I am having some issues opening a .dta file that I downloaded from a Drive shared folder.

    I am currently using STATA 18.0. When I open the dataset, I receive the following error message:

    Code:
    file /Users/mattiagatti/Desktop/finale_telescope_090524.dta not Stata format
    r(610);
    Reading previous threads, I followed your suggestions of using the following code:

    Code:
    type /Users/mattiagatti/Desktop/finale_telescope_090524.dta
    Yet, no output was shown.

    I am not sure whether this file is from an older version of STATA, yet I guess it should not be an issue. Plus, one colleague tried to open it with his STATA 18 software and he managed to do it.

    What could be the problem?

    Sincerely
    Mattia

  • #2
    Older versions of Stata should not be an issue. If you can't read it with the current Stata then it isn't a Stata data file but may be something else. Does it have any content whatsoever? What size does your OS return?

    Why not contact the people who provided it?

    Comment


    • #3
      If you can, open the file in a text editor. It may be that this is a plaintext data file.

      Comment


      • #4
        If it's plain text, type should surely make that clear.

        Comment


        • #5
          Dear All,

          thanks for the suggestions. I managed to reach out to the colleagues who uploaded the file, and yes the file was indeed empty. I now have the right one and it works.

          Sincerely
          Mattia

          Comment


          • #6
            Hi Everyone!

            I've had some similar issues... hopefully, someone can help me out...

            I am currently using Stata 18.5 and have encountered an issue with handling .dta files that I hope you can assist me with.
            I have been working with spatial matrices using the spmat command, which I then saved using the standard .dta format. The exact commands used were as follows:

            spmat create WCn using munc, id(_ID)
            save WCn.dta



            However, when I attempt to reload these matrices using commands like those:

            use WCn, clear

            spatgsa Y , w(WCn) moran

            I encounter the following error:


            file WCn.dta xp format
            r(609)


            This error suggests an issue with the file format that is preventing me from proceeding with my analysis.

            Interestingly, I am able to verify the details of the matrix using the following command, which suggests that the matrix file does exist and parts of it are accessible:
            spmat sum WCn, links detail

            Could you please provide guidance on how to resolve this error? Is there a specific procedure to follow when saving or loading spatial matrices in Stata 18.5 to avoid compatibility issues? Any advice or instructions you could offer would be greatly appreciated.

            Thanks in advance.!

            Best regards,
            Rachel

            Comment


            • #7
              I think you want the save(WCn) as an option for spmat, not as a separate line.

              Comment

              Working...
              X