Announcement

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

  • Replace missing values from one variable with values from a different variable

    Hello,
    I am working with a dataset which entails information about politics and partysystems. I have two variables (B3033, B3035) that i want to merge together because B3035 can replace a lot of the missing values of B3033. I have tried to rename B3035 to B3033 in a temporary file and then merge the two variables using the code:

    "merge 1:1 B3033 using tempfile, update"

    but I always get the error message "variable B3033 does not uniquely identify observations in the master data".

    It lies in the nature of the dataset that there are many dublicates because the question asked is a thermometer ranking question.

    I would be thankful for any help.



  • #2
    Code:
    replace B3033 = B3035 if missing(B3033)
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you Maarten, it worked!

      Comment

      Working...
      X