Learn R Programming

serosv (version 1.1.0)

hav_be_2002: Hepatitis A serological data from Belgium in 2002 (line listing)

Description

A subset of the serological dataset of Varicella-Zoster Virus (VZV) and Parvovirus B19 in Belgium where only individuals living in Flanders were selected

Usage

hav_be_2002

Arguments

Format

A data frame with 2 variables:

age

Age of individual

seropositive

If the individual is seropositive or not

Examples

Run this code
# Reproduce Fig 4.1 (upper right panel), p. 63
library(dplyr)
df <- hav_be_2002 %>%
  group_by(age) %>%
  summarise(pos = sum(seropositive), tot = n())
plot(
  df$age, df$pos / df$tot,
  pty = "s", cex = 0.06 * df$tot, pch = 16, xlab = "age",
  ylab = "seroprevalence", xlim = c(0, 86), ylim = c(0, 1)
)

Run the code above in your browser using DataLab