Announcement

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

  • Merge not matching for one year for a specific variable unrelated to the merge

    I am looking at data on recycling and compost rates and have merged this data with recycling and waste collection methods. When I merge the data does not match for one quarter in 2016 (my data is from 2012-2016) specifically for the 'other' method of waste collection. The rates have merged for all other methods and time periods, is there a reason why they wouldn't merge for the 'other' collection method? I have attached screenshots below, as you can see the rate has matched for all other methods for example in 'Adur' it is only for 'compost' 'other'. The rate data only has the variables name code year quarter and rate.

    Thank You in Advance
    Attached Files

  • #2
    It is very difficult to understand your pictures and relate them to your description. You write

    When I merge the data does not match for one quarter in 2016 (my data is from 2012-2016) specifically for the 'other' method of waste collection.
    but in fact the third picture shows that the nonmatches are for all the quarters in 2016. We also see that the unmatched observations were in the master dataset only, but since you have not shown your merge command nor samples of your two datasets, we're left to guess which of the two datasets was the master and which was the "using" dataset, and what variables you matched on in your merge command.

    Nevertheless, my guess is that, contrary to your expectations, there is no data in your "using" dataset for 2016 for the variables you matched on. Perhaps running something like
    Code:
    count if year==2016 and typeofwaste=="Compost" and method=="Other"
    on the "using" dataset will inform you if this is the case.

    The bottom line, though, is that it highly unlikely that the data "didn't merge" - it rather is the case that there were no observations in the "using" dataset that matched the observations in the master dataset, so the missing values are because there was nothing to merge.

    Comment

    Working...
    X