Announcement

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

  • Variable ISIN does not uniquely identify observations in the master data

    Hello Seniors!

    I tried to merge the two datasets but returned with the message "variable ISIN does not uniquely identify observations in the master data". I am using ISIN as a unique identifier. My data is panel data of 10 years hence this ISIN would be keep repearting due to time series data.

    I have checked the duplicated but retunred no more than 1 copy.

    What could the possible error?would appreciate some input in this regard.

    Thanks in advance.

    Irfan

  • #2
    As you say, with panel data the expectation is that you need panel identifier and time variable to identify observations uniquely. The implications for merge, however, depend totally on two facts you need to clarify:

    1. The precise structure of both datasets.

    2. The exact merge command you tried.

    Comment


    • #3
      Thanks Nick for the prompt response.

      1. one is masterdata set contains the data downloaded from the compustat, and other dataset contains only populations data (only the change in population percentage is reported) for the states where the companies in master dataset are working).


      2. merge 1:m gvkey using "filename"

      Comment


      • #4
        So, for example, what does gvkey have to do with ISIN?

        This may make sense to someone who works with your kind of data.

        Otherwise I fear that you will not get good answers until you clarify the precise structure of the datasets (not just downloaded from Compustat, or whatever).

        To spell it out, that means data examples using dataex (FAQ Advice #12).

        Comment


        • #5
          Hi Irfan,

          As Nick mentioned, you'll need to provide more detail regarding precise structure of your datasets to get an answer to your question. As Nick pointed out, "with panel data the expectation is that you need panel identifier and time variable to identify observations uniquely." If firms are in multiple states in the same year, you will also need to match on state. Thus I suspect your code will look something like:
          Code:
           merge 1:1 gvkey year using "population_data.dta"
          Or, if you have to match on state as well (which it sounds like), your code would be
          Code:
           merge 1:1 gvkey state year using "population_data.dta"
          .

          Comment

          Working...
          X