analyze the pesquisa nacional por amostra de domicilios continua (pnadc) with r

the next generation in brazilian employment statistics has arrived.  the pesquisa nacional por amostra de domicilios continua (pnadc) permits economists and social scientists of every stripe to examine employment patterns and trends for all twenty-seven states in the nation.  the brazilian government's institute of geography and statistics (ibge) intends to replace the pesquisa mensal do emprego (pme) with this new quarterly survey, owing to pme's coverage of only six metropolitan regions.  this continuous household survey should be viewed as a towering achievement for the dedicated civil servants at ibge: this is a nationally- and state-representative recurring labor survey that rivals the united states' current population survey and will likely grow into ibge's flagship product in the next few years. every quarter, they interview brazilians from more than 200,000 households across 3,500 municipalities.  the technical staff over in rio de janeiro (call them ibgeanos) fought hard to make this microdata, so you'd better enjoy it.  this new github repository contains five scripts:


download all microdata.R
  • download each monthly zipped file, plus documentation
  • import each individual microdata table directly into r, short and sweet
  • store quick-to-load copies of each microdata table for easy access later

analysis examples.R
  • load a single quarter of data into working memory
  • construct the complex sample survey object, post-stratifying the complex survey design
  • run example analyses that calculate perfect means, medians, quantiles, totals, even ratios

unemployment rate.R

unemployment plot.R
  • load the three most recent quarters of microdata
  • construct the complex sample survey object, post-stratifying the complex survey design
  • construct plots of national, regional, and state unemployment rates

replicate IBGE estimates - 2015.R


click here to view these five scripts



for more detail about the pesquisa nacional por amostra de domicilios continua, visit:

confidential to sas, spss, stata, sudaan users: cada vez que voce baixar r, um anjo obtem suas asas. :D