covid_deflator {COVIDIBGE}R Documentation

Add deflator variables to PNAD COVID19 microdata

Description

This function adds deflator variables to PNAD COVID19 microdata. For deflation of income variables, the documentation provided through the following address must be used: https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_PNAD_COVID19/Microdados/Documentacao/COVIDIBGE_Deflator.pdf.

Usage

covid_deflator(data_covid, deflator.file)

Arguments

data_covid

A tibble of PNAD COVID19 microdata read with read_covid function.

deflator.file

The deflator file for selected survey available on official website: (select the deflator zip file) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_PNAD_COVID19/Microdados/Documentacao/.

Value

A tibble with the data provided from PNAD COVID19 survey and the deflator variables added for use.

Note

For more information, visit the survey official website <https://www.ibge.gov.br/estatisticas/investigacoes-experimentais/estatisticas-experimentais/27946-divulgacao-semanal-pnadcovid1?t=o-que-e> and consult the other functions of this package, described below.

See Also

get_covid for downloading, labelling, deflating and creating survey design object for PNAD COVID19 microdata.
read_covid for reading PNAD COVID19 microdata.
covid_labeller for labelling categorical variables from PNAD COVID19 microdata.
covid_design for creating PNAD COVID19 survey design object.
covid_example for getting the path of the PNAD COVID19 example files.

Examples

# Using data read from disk
data_path <- covid_example(path="exampledata.csv")
dictionary.path <- covid_example(path="dictionaryexample.xls")
deflator.path <- covid_example(path="deflatorexample.xls")
covid.df <- read_covid(microdata=data_path, vars=c("C001","C002"))
covid.df <- covid_labeller(data_covid=covid.df, dictionary.file=dictionary.path)
covid.df <- covid_deflator(data_covid=covid.df, deflator.file=deflator.path)

# Downloading data
covid.df2 <- get_covid(year=2020, month=5, vars=c("C001","C002"),
                       labels=TRUE, deflator=FALSE, design=FALSE, savedir=tempdir())
deflator.path2 <- covid_example(path="deflatorexample.xls")
covid.df2 <- covid_deflator(data_covid=covid.df2, deflator.file=deflator.path2)

[Package COVIDIBGE version 0.1.4 Index]