LRR | R Documentation |
Calculates the increasing or decreasing version of the log-response ratio effect size index, with or without bias correction (Pustejovsky, 2015)
LRRd(
A_data,
B_data,
condition,
outcome,
baseline_phase = NULL,
intervention_phase = NULL,
improvement = "decrease",
scale = "count",
observation_length = NULL,
intervals = NULL,
D_const = NULL,
bias_correct = TRUE,
pct_change = FALSE,
confidence = 0.95
)
LRRi(
A_data,
B_data,
condition,
outcome,
baseline_phase = NULL,
intervention_phase = NULL,
improvement = "increase",
scale = "count",
observation_length = NULL,
intervals = NULL,
D_const = NULL,
bias_correct = TRUE,
pct_change = FALSE,
confidence = 0.95
)
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
|
intervention_phase |
character string specifying which value of
|
improvement |
character string indicating direction of improvement. Default is "increase". |
scale |
character string indicating the scale of the outcome variable,
with possible values |
observation_length |
length of observation session (in minutes). If a vector, the mean observation session length will be used. |
intervals |
for interval recording procedures, the total number of intervals per observation session. If a vector, the mean number of intervals will be used. |
D_const |
constant used for calculating the truncated sample mean (see Pustejovsky, 2018). If a vector, the mean value will be used. |
bias_correct |
logical value indicating whether to use bias-correction.
Default is |
pct_change |
logical value indicating whether to convert the LRR estimate and confidence interval into percentage change. |
confidence |
confidence level for the reported interval estimate. Set to
|
The response ratio parameter is the ratio of the mean level of the
outcome during phase B to the mean level of the outcome during phase A. The
log response ratio is the natural logarithm of the response ratio. This
effect size is appropriate for outcomes measured on a ratio scale (so that
zero corresponds to the true absence of the outcome. There are two versions
of the LRR. The LRR-increasing (LRRi
) is defined so that positive
values correspond to therapeutic improvements. The LRR-decreasing
(LRRd
) is defined so that negative values correspond to therapeutic
improvements. For outcomes measured as frequency counts or rates, the two
versions will have the same magnitude but opposite sign; for outcomes
measured as percentages or proportions, the LRRd and LRRi will differ in
both sign and magnitude (Pustejovsky, 2018).
Without bias correction, the log response ratio is estimated as the natural logarithm of the phase B sample mean, minus the natural logarithm of the phase A sample mean. A delta-method bias correction to the estimator is used by default.
The standard error of LRR is calculated based on a delta-method approximation, allowing for the possibility of different degrees of dispersion in each phase. The confidence interval for LRR is based on a large-sample (z) approximation.
To account for the possibility of sample means of zero, a truncated mean is
calculated following the method described in Pustejovsky (2018). Truncated
sample variances are also calculated to ensure that standard errors will be
strictly larger than zero. The truncation constant depends on the scale of
the outcome, the length of the observation sessions used to measure the
dependent variable, and (for interval recording procedures) the total
number of intervals per session (or the total number of items for other
percentage/proportion scales). The argument scale
must be specified
in order to calculate an appropriate truncation constant. For standardized
rates, the argument observation_length
must also be specified; for
percentages or proportions, the argument intervals
must be
specified. For outcomes measured using continuous recording procedures, set
intervals
equal to 60 times the length of the observation session in
minutes.
If pct_change
is TRUE
, then the LRR estimate and confidence
interval are converted into percentage change using the formula
Percentage change = 100 * (exp(LRR) - 1).
A data.frame containing the estimate, standard error, and approximate confidence interval.
Pustejovsky, J. E. (2015). Measurement-comparable effect sizes for single-case studies of free-operant behavior. Psychological Methods, 20(3), 342–359. doi:\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/met0000019")}
Pustejovsky, J. E. (2018). Using response ratios for meta-analyzing single-case designs with behavioral outcomes. Journal of School Psychology, 16, 99-112. doi:\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jsp.2018.02.003")}
A <- c(20, 20, 26, 25, 22, 23)
B <- c(28, 25, 24, 27, 30, 30, 29)
LRRd(A_data = A, B_data = B, bias_correct = FALSE)
LRRd(A_data = A, B_data = B)
LRRd(A_data = A, B_data = B, pct_change = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.