This function reads PNADC microdata.
read_pnadc(microdata, input_txt, vars = NULL)
A tibble with selected variables of the microdata, including the necessary survey design ones.
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/.
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/.
Vector of variable names to be kept for analysis. Default is to keep all variables.
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.
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"))
Run the code above in your browser using DataLab