Find households that have no head

Discussions about tabulating data in the designer or in batch mode
Post Reply
Don
Posts: 55
Joined: February 15th, 2013, 1:28 pm
Location: Barbados

Find households that have no head

Post by Don »

HI,
I'm not sure how clearly I can explain. I have a number of households each of which should have only one head as long as it is occupied. I'm trying to figure out if there are any occupied households that don't have a head. However, each occupied household might have a number of persons (spouse, children, etc). Is there a way to find the number of households missing a head in a way that can be tabulated? I think my main problem is that the information on heads is in one record while information on households are in another.
pierrew
Posts: 47
Joined: August 8th, 2012, 5:20 am
Location: Pohnpei, Federated States of Micronesia

Re: Find households that have no head

Post by pierrew »

Hello Don,
There are several ways to tackle this situation and I will try the simplest of the methods.
I am assuming that your dictionary might contain a minimum of two records. the first being the PERSON record and the second is the HOUSE record. I am also assuming that your PERSON record also contains a data item called RELATIONSHIP and in your HOUSE record there is possibly a data item called OCCUPANCY. So to identify the number of householdHead then we can do this ...

Code: Select all

numeric
numHead;

PROC OCCUPANCY
postproc
   if $ = 1 then   //1 = occupied dwelling
      numHead = count(PERSON where RELATIONSHIP = 1); //1 = head of the household
      if numHead = 0 then
         //this occupied household has no heads
      elseif numHead > 1 then
         //this occupied household has more than one head
      endif;
   endif;
I hope that this helps.
Cheers!
Post Reply