View source: R/calculate-effect-sizes.R
batch_calc_ES | R Documentation |
Calculates one or more effect size estimates, along with associated standard errors and confidence intervals, if available, for a single-case data series.
batch_calc_ES(
dat,
grouping,
condition,
outcome,
aggregate = NULL,
weighting = "equal",
session_number = NULL,
baseline_phase = NULL,
intervention_phase = NULL,
ES = c("LRRd", "LRRi", "SMD", "Tau"),
improvement = "increase",
scale = "other",
intervals = NA,
observation_length = NA,
goal = NULL,
confidence = 0.95,
format = "long",
warn = TRUE,
...
)
dat |
data frame containing SCD series for which effect sizes will be calculated. |
grouping |
A variable name or list of (unquoted) variable names that uniquely identify each data series. |
condition |
A variable name that identifies the treatment condition for each observation in the series. |
outcome |
A variable name for the outcome data. Default is |
aggregate |
A variable name of list of (unquoted) variable names that
identify additional grouping variables. Effect sizes will be calculated
separately for each unique value of these variables, after which the effect
size estimates will be averaged across values of these variables (but not
across the values of the |
weighting |
character string specifying the weighting scheme for use
when variables are specified in |
session_number |
A variable name used to order the data within each series. |
baseline_phase |
character string specifying which value of
|
intervention_phase |
character string specifying which value of
|
ES |
character string or character vector specifying which effect size
index or indices to calculate. Available effect sizes are |
improvement |
character string either indicating the direction of uniform improvement ("increase" or "decrease") or the variable name of a variable identifying the direction of improvement for each series. Default is "increase". |
scale |
character string indicating the common scale of the outcome
variable across all of the series in the data set or the name of a variable
within the dataset that identifies the outcome scale within each series.
Possible values for the scale are |
intervals |
for interval recording procedures. Either the total number
of intervals per observation session common to all series in the dataset,
or the name of a variable within the dataset that identifies the number of
intervals for each observation. If a variable name, the mean number of
intervals within each series will be used. Missing values will be ignored.
Defaults to |
observation_length |
Used for the log-response ratio. Either the common
observation session length (in minutes) across all series in the dataset or
a variable name containing the observation session length for each
observation. If a variable name, the mean observation session length within
each series will be used. Missing values will be ignored. Defaults to
|
goal |
Used for the percent of goal obtained. Either a numeric common
goal level across all series in the dataset or a variable name containing
the goal level for each series. If a variable name, the mean goal level
within each series will be used. Missing values will be ignored. Defaults
to |
confidence |
confidence level for the reported interval estimate. Set to
|
format |
character string specifying whether to organize the results in
|
warn |
logical indicating whether warnings should be displayed. Default
is |
... |
further arguments used for calculating some of the effect size indices. |
Calculates one or more effect size indices for each series in a dataset
A tibble containing the estimate, standard error, and/or confidence interval for each specified effect size.
data(McKissick)
batch_calc_ES(McKissick,
grouping = Case_pseudonym,
condition = Condition,
outcome = Outcome,
ES = c("LRRd","LRRi"),
improvement = "decrease",
scale = "count",
observation_length = 20,
format = "long")
data(Schmidt2007)
batch_calc_ES(dat = Schmidt2007,
grouping = c(Behavior_type, Case_pseudonym, Phase_num),
condition = Condition,
outcome = Outcome,
ES = c("LRRi","LRRd"),
improvement = direction,
scale = Metric,
bias_correct = TRUE,
confidence = NULL,
format = "wide")
# Aggregate across phase-pairs
batch_calc_ES(dat = Schmidt2007,
grouping = c(Behavior_type, Case_pseudonym),
aggregate = Phase_num,
weighting = "1/V",
condition = Condition,
outcome = Outcome,
ES = c("LRRi", "LRRd", "SMD", "Tau"),
improvement = direction,
scale = "count",
bias_correct = TRUE,
confidence = NULL,
format = "long")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.