read_pnadc {PNADcIBGE}R Documentation

Read PNADC microdata

Description

This function reads PNADC microdata.

Usage

read_pnadc(microdata, input_txt, vars = NULL)

Arguments

microdata

A text file containing microdata from PNADC survey, available on official website:
Quarter (select a microdata file, according to the appropriated year and, then, quarter) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Trimestral/Microdados/.
Annual per Interview (select a microdata file, according to the appropriated interview and, then, inside the data folder, choose the desired year) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Visita/.
Annual per Topic (select a microdata file, according to the appropriated quarter related to the topic and, then, inside the data folder, choose the desired year) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Trimestre/.

input_txt

A text file, related to the microdata, containing the input script for SAS, available on official website:
Quarter (select the dictionary and input zip file) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Trimestral/Microdados/Documentacao/.
Annual per Interview (select a input txt file, according to the appropriated interview and, then, inside the documentation folder, choose the desired year) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Visita/.
Annual per Topic (select a input txt file, according to the appropriated quarter related to the topic, inside the documentation folder) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Trimestre/.

vars

Vector of variable names to be kept for analysis. Default is to keep all variables.

Value

A tibble with selected variables of the microdata, including the necessary survey design ones.

Note

For more information, visit the survey official website <https://www.ibge.gov.br/estatisticas/sociais/trabalho/9171-pesquisa-nacional-por-amostra-de-domicilios-continua-mensal.html?=&t=o-que-e> and consult the other functions of this package, described below.

See Also

get_pnadc for downloading, labeling, deflating and creating survey design object for PNADC microdata.
pnadc_labeller for labeling categorical variables from PNADC microdata.
pnadc_deflator for adding deflator variables to PNADC microdata.
pnadc_design for creating PNADC survey design object.
pnadc_example for getting the path of the quarter PNADC toy example files.

Examples

input_path <- pnadc_example(path="input_example.txt")
data_path <- pnadc_example(path="exampledata.txt")
pnadc.df <- read_pnadc(microdata=data_path, input_txt=input_path, vars=c("VD4001","VD4002"))

[Package PNADcIBGE version 0.7.5 Index]