Announcement

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

  • Merging data

    Hello,

    I am trying to merge UKHLS data (which have identifier numbers) to petrol prices (which do not have identifier numbers). I have the petrol prices by year and month, and I have included the variables year and month in my UKHLS data - would anyone know any code that will allow me to merge my petrol prices to my original data set?

    Best,
    Gabi

  • #2
    You need to show a sample of both datasets using dataex as recommended in FAQ Advice #12. But it will be something like

    Code:
    use "UKHLS.dta", clear
    merge m:1 year month using "petrol.dta"

    Comment

    Working...
    X