est.density.five | R Documentation |
This function provide estimates for the parameters of generalised lambda distribution (GLD), the sample mean and the standard deviation using 5-number summary {minimum, first quartile, median, third quartile, maximum} from a study with sample size n
,
using the method explained in De Livera et al. (2024).
est.density.five(
min = NULL,
q1 = NULL,
med = NULL,
q3 = NULL,
max = NULL,
n = NULL,
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. |
opt |
logical value indicating whether to apply the optimisation step in estimating parameters using theoretical quantiles.
The default value is |
De Livera et al., (2024) proposed using the generalised lambda distribution (GLD) to estimate unknown parameters for studies reporting 5-number summaries in the meta-analysis context.
The GLD is a four parameter family of distributions defined by its quantile function under the FKML parameterisation (Freimer et al., 1988).
De Livera et al. propose that the GLD quantlie function can be used to approximate a sample's distribution using 5-point summaries.
The four parameters of GLD quantile function include: a location parameter (\lambda_1
), an inverse scale parameter (\lambda_2
>0), and two shape parameters (\lambda_3
and \lambda_4
).
The parameters of the GLD are estimated by formulating and solving a set of simultaneous equations which relate the estimated sample quantiles to their theoretical counterparts of the GLD.
parameters
: named numeric vector representing the estimated parameters ('location', 'inverse scale', 'shape 1', 'shape 2') of GLD .
mean
: numeric value of the estimated mean of the sample using GLD.
sd
: numeric value of the estimated standard deviation of the sample using GLD.
Alysha De Livera, Luke Prendergast, and Udara Kumaranathunga. A novel density-based approach for estimating unknown means, distribution visualisations, and meta-analyses of quantiles, 2024. Pre-print available here: https://arxiv.org/abs/2411.10971.
Marshall Freimer, Georgia Kollia, Govind S Mudholkar, and C Thomas Lin. A study of the generalized tukey lambda family. Communications in Statistics-Theory and Methods, 17(10):3547–3567, 1988.
Warren Gilchrist. Statistical modelling with quantile functions. Chapman and Hall/CRC, 2000.
R. King, B. Dean, S. Klinke, and P. van Staden. gld: Estimation and Use of the Generalised (Tukey) Lambda Distribution. R package version 2.6.7, 2025. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.32614/CRAN.package.gld")}. https://CRAN.R-project.org/package=gld.
est.density.minq2max()
, est.density.q1q2q3()
#Generate 5-number summary data
set.seed(123)
n <- 1000
x <- stats::rlnorm(n, 4, 0.3)
quants <- c(min(x), stats::quantile(x, probs = c(0.25, 0.5, 0.75)), max(x))
#Estimate GLD parameters using 5-number summary
params<- est.density.five(min = quants[1], q1 = quants[2], med = quants[3], q3 = quants[4],
max = quants[5], n=n, opt=TRUE)$parameters
params
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.