sigma_ref: Reference standard deviation

Description Usage Arguments Details Value References Examples

View source: R/sigma_ref.R

Description

Computes the reference standard deviation of the given meta-analysis data set. Depending on the argument type_sigma_ref, either a geometric or weighted harmonic mean is used.

Usage

1
sigma_ref(df, type_sigma_ref="geometric")

Arguments

df

data frame with one column "sigma" containing the standard errors of the estimates for the individual studies

type_sigma_ref

either "geometric" or "harmonic". Defaults to "geometric". Specifies if the geometric mean or a weighted harmonic mean is used to compute the reference standard deviation. See details for more information.

Details

If type_sigma_ref="geometric", the reference standard deviation is given by the geometric mean of the standard deviations of the individual studies (Sorbye & Rue 2014 (equation (7)). If type_sigma_ref="harmonic", the reference standard deviation σ_{ref} is the square root of a weighted harmonic mean of the variances of the individual studies, as described in Hoaglin (2016, page 490). More precisely, we have

σ_{ref} = √{ (k-1) ∑ w_i /((∑ w_i)^2 - ∑ w_i^2)},

where k is the number of studies in the data frame df and the weights are w_i=σ_i^{-2}, i =1, ... , k, for the standard deviations σ_i (or standard errors) of the individual studies.

Value

The reference standard deviation of the data set. Non-negative real number.

References

Sorbye, S., Rue, H. (2014). Scaling intrinsic Gaussian Markov random field priors in spatial modelling. Spatial Statistics 8, 39–51. https://doi.org/10.1016/j.spasta.2013.06.004

Hoaglin, D. (2016). Misunderstandings about Q and "Cochran's Q test" in meta-analysis. Statistics in Medicine 35(4), 485–495. https://doi.org/10.1002/sim.6632

Examples

1
2
3
4
5
6
7
8
# Acute Graft rejection data analyzed in Friede et al. (2017), Sect. 3.2, 
# URL: https://doi.org/10.1002/bimj.201500236
df <- data.frame(y = c(-2.310, -1.258), # log-odds-ratio
                 sigma = c(0.599, 0.642), # SE(log-odds-ratio)
                 labels = c(1:2))

sigma_ref(df=df)
sigma_ref(df=df, type_sigma_ref="harmonic")

sl4bayesmeta documentation built on Feb. 18, 2020, 3:02 p.m.