#Generate 5-number summary data (group one)
set.seed(123)
n1 <- 100
x1 <- stats::rlnorm(n1, 4, 0.3)
quants1 <- c(min(x1), stats::quantile(x1, probs = c(0.25, 0.5, 0.75)), max(x1))
#Estimate variance of the first quartile
est.q.study.level(min.g1 = quants1[1], q1.g1 = quants1[2], med.g1 = quants1[3],
q3.g1 = quants1[4],max.g1 = quants1[5], n.g1=n1,
method = "gld", effect.size.type = "q1")
#Generate 5-number summary data (group two)
set.seed(123)
n2 <- 120
x2 <- stats::rlnorm(n2, 3, 0.5)
quants2 <- c(min(x2), stats::quantile(x2, probs = c(0.25, 0.5, 0.75)), max(x2))
#Estimate variance of the difference in first quartiles (for two groups)
est.q.study.level(min.g1 = quants1[1], q1.g1 = quants1[2], med.g1 = quants1[3],
q3.g1 = quants1[4], max.g1 = quants1[5], n.g1=n1,
min.g2 = quants2[1], q1.g2 = quants2[2], med.g2 = quants2[3],
q3.g2 = quants2[4], max.g2 = quants2[5], n.g2=n2,
method = "gld", effect.size.type = "q1")
Run the code above in your browser using DataLab