Hello
I am working with the food supplements of pnad04
, pnad09
and pnad13
of IBGE and with two other banks of IPEA, one on municipal GDP ipea.pib
and another on investments in social programs by municipality% with%. With this, I'm trying to form a large database in which I can integrate the variables that interest me from the three banks using ipea.ps
, where merge(pnad13, ipea.pib, ipea.ps, by="V0102")
is the variable "control number" that represents the municipal code in PNAD. That is, I work with municipalities as a reference. The problem is that when transforming the data, dictionary and input downloaded from IBGE into the PNAD database, V0102
has 8 numbers when it should have only 7! This problem has been reported in a previous comment, but the suggestion does not solve the problem: I can not reproduce PNAD 2013 government data from microdata . The official code of the Brazilian municipalities has 7 numbers, as it appears in the banks of the IPEA and in this link: link .
pnad13[1,3]
[1] 11000015
# Este é o código de Alta Floresta do Oeste (RO) na PNAD (contém 8 números)
# Mas nos outros dois bancos o código de Alta Floresta do Oeste (RO) tem 7 números:
11000015 %in% ipea.pib$V0102
[1] FALSE
11000015 %in% ipea.ps$V0102
[1] FALSE
# Se retirarmos um 0 "extra" chegamos a seu valor verdadeiro:
1100015 %in% ipea.pib$V0102
[1] TRUE
1100015 %in% ipea.ps$V0102
[1] TRUE
# Outro exemplo:
35008270 %in% pnad13$V0102
[1] TRUE
length(which(pnad13$V0102==35008270))
[1] 18
# Este é o código de Buritizal (SP) e na PNAD está com 8 números
# Porém este código está errado e o código correto de Buritizal (SP) segue abaixo:
3508207 %in% ipea.pib$V0102
[1] TRUE
35008270 %in% ipea.pib$V0102
[1] FALSE
3508207 %in% ipea.ps$V0102
[1] TRUE
35008270 %in% ipea.ps$V0102
[1] FALSE
Supposedly it would be because V0102
and UF
share database characters. However, deleting V0102
from the dictionary does not solve the problem. Is there anyone who has worked with the PNAD using the municipalities as a reference (control variable)? Any suggestion? Many thanks.