Description Usage Arguments Details Value References Examples
View source: R/parametricmeasures.R
Calculates the logodds ratio effect size index, with or without bias correction (Pustejovsky, 2015)
1 2 3 4 5 6 7 8 9 10 11 12 13 
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

improvement 
character string indicating direction of improvement. Default is "increase". 
scale 
character string indicating the scale of the outcome variable.
Must be either 
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, 2015). If a vector, the mean value will be used. 
bias_correct 
logical value indicating whether to use biascorrection.
Default is 
confidence 
confidence level for the reported interval estimate. Set to

The odds ratio parameter is the ratio of the odds of the outcome. The logodds ratio is the natural logarithm of the odds ratio. This effect size is appropriate for outcomes measured on a percentage or proportion scale. Unlike the LRRd and LRRi, the LOR is symmetric in valence, so that the LOR for an positivelyvalenced outcome is equal to 1 times the LOR calculated after reversing the scale of the outcome so that it is negatively valenced.
Without bias correction, the logodds ratio is estimated by substituting the sample mean level in each phase in place of the corresponding parameter. A deltamethod bias correction to the estimator is used by default.
The standard error of LOR is calculated based on a deltamethod approximation, allowing for the possibility of different degrees of dispersion in each phase. The confidence interval for LOR is based on a largesample (z) approximation.
To account for the possibility of sample means of zero, a truncated mean is
calculated following the method described in Pustejovsky (2015). Truncated
sample variances are also calculated to ensure that standard errors will be
strictly larger than zero. The truncation constant depends on the total
number of intervals per session (or the total number of items for other
percentage/proportion scales). The arguments scale
and
intervals
must be specified in order to calculate an appropriate
truncation constant. For outcomes measured using continuous recording
procedures, set intervals
equal to 60 times the length of the
observation session in minutes.
A data.frame containing the estimate, standard error, and approximate confidence interval.
Pustejovsky, J. E. (2015). Measurementcomparable effect sizes for singlecase studies of freeoperant behavior. Psychological Methods, 20(3), 342–359. doi:doi: 10.1037/met0000019
1 2 3 4 5 6 7 8 9 10  A_pct < c(20, 20, 25, 25, 20, 25)
B_pct < c(30, 25, 25, 25, 35, 30, 25)
LOR(A_data = A_pct, B_data = B_pct,
scale = "percentage", intervals = 20, bias_correct = FALSE)
LOR(A_data = A_pct, B_data = B_pct,
scale = "percentage", intervals = 20)
LOR(A_data = A_pct, B_data = B_pct, scale = "percentage")
LOR(A_data = A_pct / 100, B_data = B_pct / 100, scale = "proportion")
LOR(A_data = A_pct, B_data = B_pct, scale = "percentage", improvement = "decrease")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.