| xs.nz {VGAMdata} | R Documentation |
A cross-sectional data set of a workforce company, plus another health survey, in New Zealand during the 1990s,
data(xs.nz)
A data frame with 10529 observations on the following 58 variables.
For binary variables, a "1" or TRUE means yes,
and "0" or FALSE means no.
Also, "D" means don't know,
and "-" means not applicable.
The pregnancy questions were administered to women only.
regnuma numeric vector, a unique registration number. This differs from their original registration number, and the rows are sorted by their new registration number.
Study1a logical vector, Study 1 (workforce) or Study 2?
agea numeric vector, age in years.
sexa factor with levels F and M.
pulsea numeric vector, beats per minute.
sbpa numeric vector, systolic blood pressure (mm Hg).
dbpa numeric vector, diastolic blood pressure (mm Hg).
cholesta numeric vector, cholesterol (mmol/L).
heighta numeric vector, in m.
weighta numeric vector, in kg.
famhearta factor with levels 0, 1,
D.
Has a family history of heart disease (heart attack, angina, or
had a heart bypass operation) within the immediate
family (brother, sister, father or mother, blood relatives only)?
famagea factor, following from famheart,
if yes, how old was the family member when it happened (if
more than one family member, give the age of the
youngest person)?
famcana factor with levels 0, 1,
D.
Has a family history of cancer within the immediate
family (blood relatives only)?
hearta factor, have you ever been told by a doctor that you have had a heart attack ("coronary")?
strokea numeric vector, have you ever been told by a doctor that you have had a stroke?
diabetesa numeric vector, have you ever been told by a doctor that you have had diabetes?
hypera numeric vector, have you ever been told by a doctor that you have had high blood pressure (hypertension)?
hichola numeric vector, have you ever been told by a doctor that you have had high cholesterol?
asthmaa numeric vector, have you ever been told by a doctor that you have had asthma?
cancera numeric vector, have you ever been told by a doctor that you have had cancer?
acnea numeric vector, have you ever received treatment from a doctor for acne (pimples)?
sunburna numeric vector, have you ever received treatment from a doctor for sunburn?
smokeevera numeric vector, have you ever smoked tailor-made or roll-you-own cigarettes once a week or more?
smokenowa numeric vector, do you smoke tailor-made or roll-you-own cigarettes now?
smokeagequita factor,
if no to smokenow, how old were you when
you stopped smoking?
smokehowmanya numeric vector,
if yes to smokeever, for how many years altogether
have you smoked tailor-made or roll-you-own cigarettes?
alcmontha numeric vector, do you drink alcohol once a month or more?
drinkfreqweeka numeric vector,
if yes to alcmonth, about how often do you
drink alcohol (days per week)?
Note: 0.25 is once a month,
0.5 is once every two weeks,
1 is once a week,
2.5 is 2-3 days a week,
4.5 is 4-5 days a week,
6.5 is 6-7 days a week.
Further note: 1 can, small bottle or handle of beer or home brew = 1 drink, 1 quart bottle of beer = 2 drinks, 1 jug of beer = 3 drinks, 1 flagon/peter of beer = 6 drinks, 1 glass of wine, sherry = 1 drink, 1 bottle of wine = 6 drinks, 1 double nip of spirits = 1 drink.
drinkweeka numeric vector,
how many drinks per week, on average.
This is the average daily amount of drinks multiplied
by the frequency of drinking per week.
See drinkfreqweek on what constitutes a 'drink'.
drinkmaxdaya numeric vector, in the last three months, what is the largest number of drinks that you had on any one day?
pregnanta factor, have you ever been pregnant for more than 5 months?
pregfirsta factor, if
yes to pregnant, how old were you when your first
baby was born (or you had a miscarriage after 5 months)?
preglasta factor, how old were you when your last baby was born (or you had a miscarriage after 5 months)?
babiesa factor, how many babies have you given birth to?
mooda numeric vector, does your mood often go up or down?
miseraba numeric vector, do you ever feel 'just miserable' for no reason?
hurta numeric vector, are your feelings easily hurt?
fedupa numeric vector, do you often feel 'fed up'?
nervousa numeric vector, would you call yourself a nervous person?
worriera numeric vector, are you a worrier?
worrya numeric vector, do you worry about awful things that might happen?
tensea numeric vector, would you call yourself tense or 'highly strung'?
embarrassa numeric vector, do you worry too long after an embarrassing experience?
nervesa numeric vector, do you suffer from 'nerves'?
frienda numeric vector, do you have a friend or family member that you can talk to about problems or worries that you may have?
depressa numeric vector, in your lifetime, have you ever had two weeks or more when nearly every day you felt sad or depressed?
exerviga numeric vector, how many hours per week would you do any vigorous activity or exercise either at work or away from work that makes you breathe hard and sweat? Values here ought be be less than 168.
exermoda numeric vector, how many hours per week would you do any moderate activity or exercise such as brisk walking, cycling or mowing the lawn? Values here ought be be less than 168.
hourfeeta numeric vector, on an average work day, how long would you spend on your feet, either standing or moving about?
ethnica factor with 4 levels, what ethnic group do you belong to? 0 = European (NZ European or British or other European), 1 = Maori, 2 = Pacific Island Polynesian, 3 = Other (Chinese, Indian, Other).
sleepa numeric vector, how many hours do you usually sleep each night?
snorea factor with levels 0, 1,
D.
Do you usually snore?
cata numeric vector, do you have a household pet? If yes, is it a cat?
doga numeric vector, do you have a household pet? If yes, is it a dog?
handa factor with levels
0 = right,
1 = left,
2 = either.
Are you right-handed, left-handed, or no preference for left
or right?
nhousean ordered factor with 4 levels, how many people (including yourself) usually live in your house? 1 = 1, 2 = 2, 3 = 3, 4 = four or more.
maritala factor with 4 levels:
1 = single,
2 = married or living with a partner,
3 = separated or divorced,
4 = widowed.
educan ordered factor with 4 levels.
What was the highest level of education you received?
Primary school = 1,
High school/secondary school = 2,
Polytechnic or similar = 3,
University = 4.
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!
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.
Also, variable names may change in the future as well as
their format or internal structure,
e.g., factor versus numeric.
Originally, Clinical Trials Research Unit, University of Auckland, New Zealand, http://www.ctru.auckland.ac.nz.
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.
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