sigma_ref: Reference within-study standard deviation

Description Usage Arguments Value References Examples

View source: R/sigma_ref.R

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

si4bayesmeta documentation built on Dec. 16, 2019, 3:39 p.m.