Data Cart

Your data extract

0 variables
0 samples
View Cart
UNREL
Number of unrelated persons

Codes and Frequencies



Loading Frequency Data...

Can't find the category you are looking for? Try the Detailed codes

Explore how IPUMS created this variable

Download


      class Unrel : public Editor {

public:
  Unrel(VarPointer varInfo) : Editor(varInfo) {}

  void edit() {
    long unr = getRecoded();
    // relate returns a 4 digit number.  The 5000-5999 codes
    // are the category 'unrelated'.
    if (countPeople() < 1 || !RELATE.available()) {
      unr = 0;
    } else {

      unr = 0;
      int r = 0;
      for (int i = 1; i <= countPeople(); i++) {
        r = RELATE(i);

        if ((r >= 5000) && (r < 6000))
          unr++;
      }

      if (unr > 9)
        unr = 9;
    }

    setData(unr);
  }
};