LRM: Log ratio of medians

Description Usage Arguments Details Value References Examples

View source: R/parametric-measures.R

Description

Calculates the log ratio of medians effect size index

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
LRM(
  A_data,
  B_data,
  condition,
  outcome,
  baseline_phase,
  improvement = "increase",
  delta_method = FALSE,
  confidence = 0.95
)

Arguments

A_data

vector of numeric data for A phase. Missing values are dropped.

B_data

vector of numeric data for B phase. Missing values are dropped.

condition

vector identifying the treatment condition for each observation in the series.

outcome

vector of outcome data for the entire series.

baseline_phase

character string specifying which value of condition corresponds to the baseline phase. Defaults to first observed value of condition.

improvement

character string indicating direction of improvement. Default is "increase".

delta_method

logical value indicating whether to use delta method to approximate variance of log ratio of medians. Default is FALSE, which estimates the variance based on the fact that the logarithm of a median is the same as the median of the log-transformed outcomes. If TRUE, the variance of log ratio of medians is approximated using delta method.

confidence

confidence level for the reported interval estimate. Set to NULL to omit confidence interval calculations.

Details

The ratio of medians effect size parameter is defined as the ratio of the medians of the outcomes in different phases. The log ratio of the medians is the natural logarithm of the ratio of medians. This effect size is appropriate for outcomes that are skewed, symmetric but highly leptokurtic, or right-censored (Bonett & Price Jr, 2020).

Value

A data frame containing the estimate, standard error, and confidence interval.

References

Bonett, D. G. & Price Jr, R. M. (2020). Confidence Intervals for Ratios of Means and Medians. Journal of Educational and Behavioral Statistics, 45(6), 750–770. doi:doi: 10.3102/1076998620934125

Bonett, D. G., & Price, R. M. (2020). Interval estimation for linear functions of medians in within-subjects and mixed designs. British Journal of Mathematical and Statistical Psychology, 73(2), 333-346. doi:doi: 10.1111/bmsp.12171

Examples

1
2
3
A <- c(20, 20, 26, 25, 22, 23)
B <- c(28, 25, 24, 27, 30, 30, 29)
LRM(A_data = A, B_data = B)

SingleCaseES documentation built on Sept. 30, 2021, 5:09 p.m.