Learn R Programming

serosv (version 1.1.0)

vzv_be_2001_2003: VZV serological data from Belgium from 2001-2003 (line listing)

Description

The survey is the same as the one used to study the seroprevalence of parvovirus B19 in Belgium, as described above.

Usage

vzv_be_2001_2003

Arguments

Format

A data frame with 4 variables:

age

Age of individual

seropositive

If the individual is seropositive or not

gender

Gender of individual

VZVmIUml

VZV milli international units per ml

Examples

Run this code
# Reproduce Fig 4.7 (right panel), p.71
library(dplyr)
df <- vzv_be_2001_2003 %>%
  mutate(age = round(age)) %>%
  group_by(age) %>%
  summarise(pos = sum(seropositive), tot = n())
plot(df$age, df$pos / df$tot,
  cex = 0.036 * df$tot, pch = 19, xlab = "age", ylab = "seroprevalence",
  xlim = c(0, 45), ylim = c(0, 1)
)

Run the code above in your browser using DataLab