est.sd | R Documentation |
This function estimates the sample standard deviation from a study presenting quantile summary measures with the sample size (n
). The quantile summaries can fall into one of the following categories:
S_1
: { minimum, median, maximum }
S_2
: { first quartile, median, third quartile }
S_3
: { minimum, first quartile, median, third quartile, maximum }
The est.sd
function implements newly proposed flexible quantile-based distribution methods for estimating sample standard deviation by De Livera et al. (2024)
as well as other existing methods for estimating sample standard deviations by Shi et al. (2020) and McGrath et al. (2020).
est.sd(
min = NULL,
q1 = NULL,
med = NULL,
q3 = NULL,
max = NULL,
n = NULL,
method = "shi/wan",
opt = TRUE
)
min |
numeric value representing the sample minimum. |
q1 |
numeric value representing the first quartile of the sample. |
med |
numeric value representing the median of the sample. |
q3 |
numeric value representing the third quartile of the sample. |
max |
numeric value representing the sample maximum. |
n |
numeric value specifying the sample size. |
method |
character string specifying the approach used to estimate the sample standard deviations. The options are the following:
|
opt |
logical value indicating whether to apply the optimization step of |
For details explaining the new method 'gld/sld'
, check est.mean
.
sd
: numeric value representing the estimated standard deviation of the sample.
Alysha De Livera, Luke Prendergast, and Udara Kumaranathunga. A novel density-based approach for estimating unknown means, distribution visualisations, and meta-analyses of quantiles. Submitted for Review, 2024, pre-print available here: https://arxiv.org/abs/2411.10971
Jiandong Shi, Dehui Luo, Hong Weng, Xian-Tao Zeng, Lu Lin, Haitao Chu, and Tiejun Tong. Optimally estimating the sample standard deviation from the five-number summary. Research synthesis methods, 11(5):641–654, 2020.
Xiang Wan, Wenqian Wang, Jiming Liu, and Tiejun Tong. Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range. BMC medical research methodology, 14:1–13, 2014.
Sean McGrath, XiaoFei Zhao, Russell Steele, Brett D Thombs, Andrea Benedetti, and DEPRESsion Screening Data (DEPRESSD) Collaboration. Estimating the sample mean and standard deviation from commonly reported quantiles in meta-analysis. Statistical methods in medical research, 29(9):2520–2537, 2020b.
#Generate 5-point summary data
set.seed(123)
n <- 1000
x <- stats::rlnorm(n, 5, 0.5)
quants <- c(min(x), stats::quantile(x, probs = c(0.25, 0.5, 0.75)), max(x))
obs_sd <- sd(x)
#Estimate sample SD using s3 (5 number summary)
est_sd_s3 <- est.sd(min = quants[1], q1 = quants[2], med = quants[3], q3 = quants[4],
max = quants[5], n=n, method = "gld/sld")
est_sd_s3
#Estimate sample SD using s1 (min, median, max)
est_sd_s1 <- est.sd(min = quants[1], med = quants[3], max = quants[5],
n=n, method = "gld/sld")
est_sd_s1
#Estimate sample SD using s2 (q1, median, q3)
est_sd_s2 <- est.sd(q1 = quants[2], med = quants[3], q3 = quants[4],
n=n, method = "gld/sld")
est_sd_s2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.