I am trying to answer the following question: How many couples with children under 18 do both parents work out?
Given a% census of people in the 2010 census (such as that of Acre ), first thing I did was filter the table by couples with children.
censo <- read.csv("AC.csv", sep = "\t")
# V5090 -- TIPO DE COMPOSIÇÃO FAMILIAR DAS FAMÍLIAS ÚNICAS E CONVIVENTES PRINCIPAIS
# 1 - Casal sem filho(s)
# 2 - Casal sem filho(s) e com parente(s)
# 3 - Casal com filho(s) <----------------------
# 4 - Casal com filho(s) e com parente(s)
# 5 - Mulher sem cônjuge com filho(s)
# 6 - Mulher sem cônjuge com filho(s) e com parente(s)
# 7 - Homem sem cônjuge com filho(s)
# 8 - Homem sem cônjuge com filho(s) e com parente(s)
# 9 - Outro
# Branco
censo_cf <- censo[which(censo$"V5090" == 3),]
Then I filtered so that at least one of the children was under 18 years old:
# V6660 IDADE DO ÚLTIMO FILHO TIDO NASCIDO VIVO ATÉ 31 DE JULHO DE 2010:
censo_cf18 <- censo_cf[which(censo_cf$V6660 < 18),]
My next step would be to group the respondents by domicile (to later check which homes they both worked). Although I did not see this documented anywhere for the 2010 census, according to 2000 census documentation (page 83) the variable censo
would be:
Identification of the domicile
So, I would expect that within my subsets (couples with children) all households had at least three respondents (husband, wife and child). However, only three households had this:
# V0300 CONTROLE
table_V0300 <- table(censo_cf18$V0300)
pessoas_por_domicilio <- table(table_V0300)
pessoas_por_domicilio
1 2 3
9340 57 3
What is my error?