read_hilda: Read and Combine HILDA waves

Description Usage Arguments Details Value Author(s) Examples

Description

Extracts and combines variables from selected HILDA waves

Usage

1
read_hilda(domain, waves = NULL, dir = NULL, filenames = NULL, release = 18)

Arguments

domain

The domain you want to extract. Domain refers to the variable prefixes (of any length), excluding any wave indicators. For several domains separate by c("x", "y").

waves

The wave(s) you want the domain variables to come from. Can be left empty if using custom file names.

dir

Directory where the STATA files are located. Default is the current working directory.

filenames

Vector of .dta files to be read. Default is names used by the Australian Data Archive.

release

Release number of the wave to be read. Defaults to 18. (newest wave)

Details

The read_hilda function reads, extracts and combines variables from individual waves (a wave refers to each separate survey in a series of related surveys) of the panel dataset 'The Household, Income and Labour Dynamics in Australia' (HILDA), into an R data.frame. If you are using many waves read_hilda can take a while to run, go grab a cup of coffee! Don't forget to save the resulting data.frame so you don't have to do it again.

The identifier xwaveid is included by default. An indicator wave is created, keeping track of from which wave a variable originates (denoted by wave prefixes a:q for waves 1:17). The function reads from the HILDA .dta (STATA) files.

Value

A data.frame with the chosen domain variables, xwaveid and wave indicator.

Author(s)

Sara Kalucza & Sebastian Kalucza

Examples

1
2
3
4
5
path <- system.file("extdata", package = "hildareadR")
# Reads variable hibiff and hgage from waves 1 to 3 in directory fdir and from release 17
read_hilda(c("hibiff", "hgage"), waves = 1:3, dir = path, release = 17)
# Reads variable aiopeye from custom files in directory fdir and from release 17
read_hilda("aiopeye", dir = path, filenames = c("custom1.dta", "custom2.dta"), release = 17)

hildareadR documentation built on Dec. 4, 2020, 5:07 p.m.