Announcement

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

  • Creating a variable dependent on two other variables

    Hi,

    I am trying to create a variable that is dependent on two other variables and do not know how to approach it.

    Below is the question I am prompted with:

    Create a variable that indicates whether the householder and the non-householder share the
    same education category.

    the variables used for this will be educ1 educ0 rel_var

    Thank you!

  • #2
    Code:
    g educ_same = educ1 == educ0

    Comment


    • #3
      Thank you George! Life saver, I also realized that I appended data instead of merging and your code did exactly what I needed.

      Comment

      Working...
      X