es_ratio: es_ratio: Function for calculating ratio-based effect size...

View source: R/es_stat.R

es_ratioR Documentation

es_ratio: Function for calculating ratio-based effect size statistics

Description

This function estimates less commonly used (lnHR) or newly developed effect sizes (i.e. for variance: lnCVR, lnVR, lnSD). Effect size statistics include both the effect size itself and its sampling error. For two-group comparisons, directionally is dependent on the group used for m1 or d1. In all cases, m1 - m2 or d1-d2 is contrasted.

Usage

es_ratio(
  m1,
  m2,
  sd1,
  sd2,
  n1,
  n2,
  d1,
  d2,
  n1HR,
  n2HR,
  cor = cor,
  equal.corr = TRUE,
  type = c("lnRR", "lnCVR", "lnVR", "lnHR")
)

Arguments

m1

Mean of group 1

m2

Mean of group 2

sd1

Standard deviation of group 1

sd2

Standard deviation of group 2

n1

Sample size of group 1

n2

Sample size of group 2

d1

Number of events (e.g. deaths) in time interval t-1 to t for group 1. Used for type "lnHR" only.

d2

Number of events (e.g. deaths) in time interval t-1 to t for group 2. Used for type "lnHR" only.

n1HR

Number at risk for group 1 during time interval t-1 to t. Used for type "lnHR" only.

n2HR

Number at risk for group 2 during time interval t-1 to t. Used for type "lnHR" only.

cor

Assumed correlation between mean and variance. Used when a vector of statistics of length 1 is provided. Used only with type = "lnCVR".

equal.corr

Logical indicating whether the correlation between log mean and log sd are assumed to be the same (TRUE) or different (FALSE). Used only with type = "lnCVR".

type

The type specifies the specific effect statistics one wishes to calculate. Types include: "lnHR" = log hazards ratio, "lnRR" = log response ratio, "lnCVR" = log coefficient of variation ratio, "lnVR" = log variance ratio.

Value

Function returns the effect size and its sampling variance in a matrix (two column, n rows). The arguments can be vectors.

Author(s)

Daniel Noble - daniel.noble@unsw.edu.au


daniel1noble/metaAidR documentation built on Oct. 14, 2023, 3:23 p.m.