**asdfree by anthony damico**, and kindly contributed to R-bloggers)

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 four 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, forgoing the complex survey design*
- run example analyses that calculate perfect means, medians, quantiles, totals, even ratios

**unemployment rate.R**

- load the survey from the first quarter of 2015
- construct the complex sample survey object, forgoing the complex survey design*
- replicate the statistics but not coefficients of variation found in an official publication

**unemployment plot.R**

- load the three most recent quarters of microdata
- construct the complex sample survey object, forgoing the complex survey design*
- construct plots of national, regional, and state unemployment rates

click here to view these four scripts

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

- a portuguese-language explanation of the pnadc replacing pme
- a portuguese-language monthly and quarterly results pages

notes:

* still a new product, the methodologists at ibge have not yet released the sampling and post-stratification information necessary to construct proper confidence intervals, standard errors, and coefficients of variation. that’s why each of the currently-released scripts include a warning that the variance calculation is not yet finalized. the point estimates, however, are correct. this post will be updated once ibge releases the sample design information necessary to calculate the variance properly.

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

**leave a comment**for the author, please follow the link and comment on their blog:

**asdfree by anthony damico**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...