LVD | R Documentation |
Transoesophageal measurements of left ventricular length (cm).
LVD
Four matrices, each representing a block of 36 LVD measurements.
block1
a 6x6 matrix, representing indices 1 - 36
block2
a 6x6 matrix, representing indices 37 - 72
block3
a 6x6 matrix, representing indices 73 - 108
block4
a 6x6 matrix, representing indices 109 - 144
These data were used to teach confidence intervals to undergraduate 1st year medical students in Oxford. Each student (from classes of between 20-25 students) draws a set of 12 numbers from a much larger list (the 'population') from which the mean is known to us, but not revealed to them. We instruct the students to use dice to select 12 numbers from the list in order to mimic a random sample. Each student then calculates a sample mean and a 95% confidence interval and they are invited to come up to the front and write their confidence intervals up on the board at the front of the class and the concept of confidence intervals demonstrated.
With thanks to Dr Thomas Fanshawe, Prof Richard Stevens and Prof Rafael Perera.
data(LVD, package = "R4HCR")
# population is 144 individuals arranged in 4 blocks
# sampling is done with two dice -
# scores indicate which row and column to select
# sample, three from each of the four blocks
# sample size n = 12
# simulate 12 throws of 2 dice
die1 <- sample(x = 1:6, 12, TRUE)
die2 <- sample(x = 1:6, 12, TRUE)
# drawing the numbers from the blocks
smp <- c(
LVD[[1]][cbind(die1[1:3],die2[1:3])],
LVD[[2]][cbind(die1[4:6],die2[4:6])],
LVD[[3]][cbind(die1[7:9],die2[7:9])],
LVD[[4]][cbind(die1[10:12],die2[10:12])]
)
# the first four numbers of our sample
smp[1:4]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.