get_SE.bc.mean.sd: Parametric bootstrap standard error estimation for the...

View source: R/boot.R

get_SE.bc.mean.sdR Documentation

Parametric bootstrap standard error estimation for the box-cox approach

Description

Computes a parametric bootstrap standard error estimate for the box-cox approach.

Usage

## S3 method for class 'bc.mean.sd'
get_SE(x, nboot = 1000, shift.when.negative = TRUE, shift.val = 0.5, ...)

Arguments

x

object of class "bc.mean.sd".

nboot

numeric value giving the number of bootstrap replicates. The default is 1000.

shift.when.negative

logical scalar indicating whether to add a constant to the generated sample quantiles if the smallest quantile (i.e., the minimum value in scenarios S1 and S3, the first quartile in scenario S2) is negative. When this argument is set to TRUE, a constant is added such that the smallest quantile equals shift.val. The default is TRUE.

shift.val

numeric value to which the smallest quantile should be shifted to if it is negative (see argument shift.when.negative). This argument is only applicable when shift.when.negative is set to TRUE. The default is 0.5.

...

other arguments.

Value

A list with the following components:

est.se

Estimated standard error of the mean estimator.

boot.means

Bootstrap replicates of the mean estimates.

boot.sds

Bootstrap replicates of the standard deviation estimates.

References

McGrath S., Katzenschlager S., Zimmer A.J., Seitel A., Steele R., and Benedetti A. (2023). Standard error estimation in meta-analysis of studies reporting medians. Statistical Methods in Medical Research. 32(2):373-388.

McGrath S., Zhao X., Steele R., Thombs B.D., Benedetti A., and the DEPRESsion Screening Data (DEPRESSD) Collaboration. (2020). Estimating the sample mean and standard deviation from commonly reported quantiles in meta-analysis. Statistical Methods in Medical Research. 29(9):2520-2537.

See Also

bc.mean.sd

Examples

## Generate S2 summary data
set.seed(1)
n <- 250
x <- stats::rlnorm(n, 5, 0.25)
quants <- stats::quantile(x, probs = c(0, 0.5, 1))

## Estimate the mean and its standard error
res <- bc.mean.sd(min.val = quants[1], med.val = quants[2], max.val = quants[3],
                  n = n)
get_SE(res)$est.se

estmeansd documentation built on May 29, 2024, 7:11 a.m.