sigma_ref {si4bayesmeta}R Documentation

Reference within-study standard deviation

Description

Computes the reference within-study standard deviation through the geometric mean as suggested in equation (7) by Sorbye and Rue (2014).

Usage

sigma_ref(df)

Arguments

df

data frame with one column "sigma" containing the standard deviations sigmai in each study

Value

Refernce standard deviation expressed by the geometric mean as suggested in equation (7) by Sorbye and Rue (2014). 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

Examples

rT<-c(14,4)
nT<-c(61,36)
rC<-c(15,11)
nC<-c(20,36)
  
df = data.frame(y = log((rT*(nC-rC))/(rC*(nT-rT))), # log-odds-ratio
                sigma = sqrt(1/rT+1/(nT-rT)+1/rC+1/(nC-rC)), # SE(log-odds-ratio)
                labels = c(1:2))
  
sigma_ref(df) # 0.620372

[Package si4bayesmeta version 0.1-1 Index]