Package 'hildareadR'

Title: Extract Variables from HILDA
Description: Makes it easy to extract and combine variables from the HILDA (Household, Income and Labour Dynamics in Australia) survey maintained by the Melbourne Institute <https://melbourneinstitute.unimelb.edu.au/hilda>.
Authors: Sebastian Kalucza [aut, cre], Sara Kalucza [aut]
Maintainer: Sebastian Kalucza <[email protected]>
License: GPL-2
Version: 0.2.0
Built: 2024-11-24 03:23:49 UTC
Source: https://github.com/cran/hildareadR

Help Index


hildareadR: A package to extract domain variables from the HILDA dataset

Description

This package provides an easy way to extract and combine variables from multiple HILDA waves (a wave refers to each separate survey in a series of related surveys), using the read_hilda function.

Details

HILDA is collected and maintained by the Melbourne Instutite and distributed via dataverse. To apply for access to the HILDA data, visit the Australian Data Archive (https://dataverse.ada.edu.au/). More information about the HILDA survey dataset can be found at (https://melbourneinstitute.unimelb.edu.au/hilda)

Author(s)

Sara Kalucza & Sebastian Kalucza


Read and Combine HILDA waves

Description

Extracts and combines variables from selected HILDA waves

Usage

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

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)