Announcement

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

  • Switch observations between two (or more) variables

    Hello,

    Second post in a day.. but, I'm looking for a possible command that would switch two observations of two different variables.

    For example I have a variable for Mother's answers and another for father's ones. But, surveyors accidentally begin by father rather than mother so that some observations are in switched

    What i use for now is to create a third variable in order to save one of the two variables and then transfer in the second left like:
    1 -> 3 then 2 -> 1 then 3 -> 2

    Maybe there's a command allowing this switch more easily/less subject to errors (swith according to a unique ID of course - and hoping the answer, if exists, is not about replace cmd)

    Thanks to all

    Quentin.

  • #2
    From SSC you can get -swapval-, written by Nick Cox. (-ssc install swapval-).

    Comment

    Working...
    X