covid_deflator {COVIDIBGE}R Documentation

Add deflator variables to PNAD COVID19 microdata


This function adds deflator variables to PNAD COVID19 microdata. For deflation of income variables, the documentation provided through the following address must be used:


covid_deflator(data_covid, deflator.file)



A tibble of PNAD COVID19 microdata read with read_covid function.


The deflator file for selected survey available on official website: (select the deflator zip file) -


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


For more information, visit the survey official website <> 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.


# 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]