Announcement

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

  • Not Stata Format When Merging Files

    Hello,
    I am relatively new to Stata and I am trying to merge two datasets. During this process, I keep getting the error message "Not Stata Format". Here is a brief example of what I am trying to merge. I am trying to merge the player's name and their contract information in one dataset with the corresponding name in a player information dataset:
    Player Contract Years Contract Amount
    Chris Davis 7 161000000
    Player Year Age
    Chris Davis 2008 22
    Chris Davis 2009 23
    Chris Davis 2010 24
    Chris Davis 2011 25
    Chris Davis 2012 26
    Chris Davis 2013 27
    Chris Davis 2014 28
    Chris Davis 2015 29
    Chris Davis 2016 30
    Chris Davis 2017 31
    Chris Davis 2018 32
    Chris Davis 2019 33

    Any thoughts?

  • #2
    I am trying to merge two datasets.
    when you merge your data files make sure they are in Stata's own .dta format.
    if they are saved in any other format, Stata will not be able to merge them, even if it can import them.
    in that case import the file and resave as dta from Stata before merging.

    Comment


    • #3
      Hi. Thank you for your help! This may sound like a dumb question: so after I import one file, save it as a .dta, then import the next one, do the same, then merge? Thanks!

      Comment


      • #4
        Please tell us that you have cross-posted this question to Reddit, as you are asked to do.

        Comment


        • #5
          Originally posted by Guest
          so after I import one file, save it as a .dta, then import the next one, do the same, then merge?
          No. Just the first. When you import the second into memory, it will be converted into a Stata dataset.
          Last edited by sladmin; 16 Nov 2021, 07:37. Reason: anonymize original poster

          Comment

          Working...
          X