Learn R Programming

VGAM (version 0.8-7)

xs.nz: Cross-sectional Data from the New Zealand Population

Description

A cross-sectional data set of a workforce company, plus another health survey, in New Zealand during the 1990s,

Usage

data(xs.nz)

Arguments

source

Originally, Clinical Trials Research Unit, University of Auckland, New Zealand, http://www.ctru.auckland.ac.nz.

Warning

More variables may be added in the future and these may be placed in any column position. Therefore references such as xs.nz[, 12] are dangerous.

Details

The data frame is a subset of the entire data set which was collected from a confidential self-administered questionnaire administered in a large New Zealand workforce observational study conducted during 1992--3. The data were augmented by a second study consisting of retirees. The data can be considered a reasonable representation of the white male New Zealand population in the early 1990s. There were physical, lifestyle and psychological variables that were measured. The psychological variables were headed "Questions about your feelings".

Although some data cleaning was performed and logic checks conducted, anomalies remain. Some variables, of course, are subject to a lot of measurement error and bias. It is conceivable that some participants had poor reading skills!

References

MacMahon, S., Norton, R., Jackson, R., Mackie, M. J., Cheng, A., Vander Hoorn, S., Milne, A., McCulloch, A. (1995) Fletcher Challenge-University of Auckland Heart & Health Study: design and baseline findings. New Zealand Medical Journal, 108, 499--502.

See Also

chest.nz.

Examples

Run this code
data(xs.nz)
summary(xs.nz)

# Handling of factors requires care
is.factor(xs.nz$babies) # TRUE
summary(xs.nz$babies)   # Note the "-"s
charbabies <- as.character(xs.nz$babies)
summary(as.numeric(charbabies)) # "-"s converted to NAs + warning
table(as.numeric(charbabies))   # Ditto

Run the code above in your browser using DataLab