Learn R Programming

fastR2 (version 1.2.4)

PetStress: Pets and stress

Description

Does having a pet or a friend cause more stress?

Arguments

Format

A data frame with 45 observations on the following 2 variables.

group

a factor with levels Control, Friend, or Pet

rate

average heart rate while performing a stressful task

Details

Fourty-five women, all self-proclaimed dog-lovers, were randomly divided into three groups of subjects. Each performed a stressful task either alone, with a friend present, or with their dog present. The average heart rate during the task was used as a measure of stress.

References

These data also appear in

Brigitte Baldi and David S. Moore, The Practice of Statistics in the Life Sciences, Freeman, 2009.

Examples

Run this code

data(PetStress)
xyplot(rate ~ group, data = PetStress, jitter.x = TRUE, type = c('p', 'a'))
gf_jitter(rate ~ group, data = PetStress, width = 0.1, height = 0) %>%
  gf_line(group = 1, stat = "summary", color = "red")

Run the code above in your browser using DataLab