ce_hg {cepumd}R Documentation

Convert a CE heiarchical grouping file to a data frame

Description

A CE heiarchical grouping ('HG') file shows the levels of aggregation for expenditure categories used to produce official CE expenditure estimates. This function reads in a CE HG file for the given year and HG type as data frame.

Usage

ce_hg(year, survey, hg_zip_path = NULL, hg_file_path = NULL)

Arguments

year

A year between 1996 and the last year of available CE PUMD.

survey

The type of HG file; one of "interview", "diary", or "integrated". Accepted as a character or symbol.

hg_zip_path

The path to a zip file containing HG files downloaded from the CE website. The structure of the zip file must be exactly as it is when downloaded to be useful to this function.

hg_file_path

The path to a single HG file that has already been extracted. If this argument is given 'hg_zip_path' is ignored.

Details

Interview and Diary HG files are available starting in 1997 and integrated files start in 1996. For consistency, this function and other cepumd functions only work with data starting in 1997.

The output will contain only expenditure UCCs and not UCCs related to household characteristics, income, assets, or liabilities. The scope of the functions in this package is limited to expenditures. Income, for example, is imputed and calculation of income means goes through a different process than do expenditure means. Please see User's Guide to Income Imputation in the CE

Value

A data frame containing the following columns:

Examples

## Not run: 
# 'survey' can be entered as a string
ce_hg(2016, "integrated", "hg-files.zip")

# 'survey' can also be entered as a symbol
ce_hg(2016, integrated, "hg-files.zip")

## End(Not run)

[Package cepumd version 2.1.0 Index]