pnadc_deflator {PNADcIBGE} | R Documentation |
Add deflator variables to PNADC microdata
Description
This function adds deflator variables to PNADC microdata. For deflation of income variables, the documentation provided through the following addresses must be used:
Quarter - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Trimestral/Microdados/Documentacao/PNADcIBGE_Deflator_Trimestral.pdf.
Annual per Interview - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Visita/Documentacao_Geral/PNADcIBGE_Deflator_Anual_Visita.pdf.
Annual per Topic - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Trimestre/Documentacao_Geral/PNADcIBGE_Deflator_Anual_Trimestre.pdf.
Usage
pnadc_deflator(data_pnadc, deflator.file)
Arguments
data_pnadc |
A tibble of PNADC microdata read with |
deflator.file |
The deflator file for selected survey available on official website: |
Value
A tibble with the data provided from PNADC survey and the deflator variables added for use.
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.
read_pnadc for reading PNADC microdata.
pnadc_labeller for labeling categorical variables from PNADC microdata.
pnadc_design for creating PNADC survey design object.
pnadc_example for getting the path of the quarter PNADC toy example files.
Examples
# Using data read from disk
input_path <- pnadc_example(path="input_example.txt")
data_path <- pnadc_example(path="exampledata.txt")
dictionary.path <- pnadc_example(path="dictionaryexample.xls")
deflator.path <- pnadc_example(path="deflatorexample.xls")
pnadc.df <- read_pnadc(microdata=data_path, input_txt=input_path, vars=c("VD4001","VD4002"))
pnadc.df <- pnadc_labeller(data_pnadc=pnadc.df, dictionary.file=dictionary.path)
pnadc.df <- pnadc_deflator(data_pnadc=pnadc.df, deflator.file=deflator.path)
# Downloading data
pnadc.df2 <- get_pnadc(year=2017, quarter=4, selected=FALSE, vars=c("VD4001","VD4002"),
defyear=2017, defperiod=4, labels=TRUE, deflator=FALSE, design=FALSE,
reload=TRUE, curlopts=list(), savedir=tempdir())
deflator.path2 <- pnadc_example(path="deflatorexample.xls")
pnadc.df2 <- pnadc_deflator(data_pnadc=pnadc.df2, deflator.file=deflator.path2)