- data
A data set in wide format including an ID variable and variables for each measurement point.
- sg_crit1_cutoff
Numeric, specifying the cut-off value to be used for the first sudden gains criterion.
The function define_crit1_cutoff
can be used to calculate a cutoff value based on the Reliable Change Index (RCI; Jacobson & Truax, 1991).
If set to NULL
the first criterion wont be applied.
- id_var_name
String, specifying the name of the ID variable. Each row should have a unique value.
- sg_var_list
Vector, specifying the variable names of each measurement point sequentially.
- tx_start_var_name
String, specifying the variable name of the first measurement point of the intervention.
- tx_end_var_name
String, specifying the variable name of the last measurement point of the intervention.
- sg_measure_name
String, specifying the name of the measure used to identify sudden gains/losses.
- sg_crit2_pct
Numeric, specifying the percentage change to be used for the second sudden gains/losses criterion.
If set to NULL
the second criterion wont be applied.
- sg_crit3
If set to TRUE
the third criterion will be applied automatically adjusting the critical value for missingness.
If set to FALSE
the third criterion wont be applied.
- sg_crit3_alpha
Numeric, alpha for the student t-test (two-tailed) to determine the critical value to be used for the third criterion.
Degrees of freedom are based on the number of available data in the three sessions preceding the gain and the three sessions following the gain.
- sg_crit3_adjust
Logical, specify whether critical value gets adjusted for missingness, see Lutz et al. (2013) and the documentation of this R package for further details.
This argument is set to TRUE
by default adjusting the critical value for missingness as described in the package documentation and Lutz et al. (2013):
A critical value of 2.776 is used when all three data points before and after a potential gain are available,
where one data point is missing either before or after a potential gain a critical value of 3.182 is used,
and where one data point is missing both before and after the gain a critical value of 4.303 is used (for sg_crit3_alpha = 0.05).
If set to FALSE
the critical value set in sg_crit3_critical_value
will instead be used for all comparisons, regardless of missingnes in the sequence of data points that are investigated for potential sudden gains.
- sg_crit3_critical_value
Numeric, specifying the critical value to instead be used for all comparisons, regardless of missingnes in the sequence of data points that are investigated for potential sudden gains.
- identify
String, specifying whether to identify sudden gains ("sg"
) using identify_sg
or sudden losses ("sl"
) using identify_sl
.
The default is to identify sudden gains ("sg"
).
- identify_sg_1to2
Logical, indicating whether to identify sudden losses from measurement point 1 to 2.
- format
String, specifying the format of the data file, "CSV"
, "SPSS"
, "STATA"
or "Excel"
.
- path
String, specifying the file name ending with the matching file extension,
".csv"
, ".sav"
, ".dta"
or ".xlsx"
.
- stata_version
Numeric, specifying STATA version number.
- ...
Additional parameters to be passed on to the specified write function,
see write_csv
for "CSV"
, write_sav
for "SPSS"
, write_dta
for "STATA"
or write_xlsx
for "Excel"
for more information.