Stata: Trying to merge two data sets with common year observations
I am currently trying to merge two datasets with a common "year" variable using Stata. One dataset is purely for incorporating CPI with an associated year, and so the only variables are "year" and "cpilevel". The other is our main dataset, and we are trying to merge the CPI-year dataset in order to create a new "cpilevel" variable in the main dataset associated with the same years. I am attaching photos of the CPI-specific dataset and a cross-section of the main dataset (there are far too many observations to capture the whole set). Please let me know the easiest way to merge these datasets; we have tried using m:1 codes but can't seem to get the right combination.
::EDIT::
Here are the results of the merge command. It did not accomplish what we need in terms of merging the "cpilvl" variable with the "year" variable in each of the main observations, but it seems to be on the right track?
Category Data Science