Announcement

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

  • Instrumental Variable, combining datasets


    Hello,

    I am using an instrumental variable for trade openness to analyze the effect of trade openness on economic growth.

    In my first dataset I have panel data from 1970 to 2015 for 109 countries and data on trade volume, GDP etc.

    In my second dataset I have the population-weighted distances between the individual countries but of course without the annual dimension.


    To do a two-stages-least-squares estimation, I tried to combine the datasetswith the merge command but it said: variable CountryCode does not uniquely identify observations in the master data


    Also I am not sure how to deal with the summation in stata, is there some command I can use and to define which observations to use in the summation?

    Could someone help me?

    This is my instrumental variable:

    Click image for larger version

Name:	Instrument.png
Views:	1
Size:	7.5 KB
ID:	1513118


    Thank you very much!

  • #2
    Alice:
    unfortunately, the way your question is posed does not comply with Statalist requirements (see the FAQ about posting-related topics).
    Interested listers cannot see what you typed and what Stata gave you back and the formula you reported is not helpfully either, as we do not know what it means and which endogenous variable it instruments.
    As far as you -merge- issue is concerned, if you have panel data the same -panelid- (which belongs, in general, to a time-invariant -country-) has multiple observations (as the couple -panelid- -country- lasts over-years-). You may need a more elaborated -merge- instruction, but again, we do not know, as you did not share an example/excerpt of your data via -dataex-.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment

    Working...
    X