Title: | Plot Jacobson-Truax Reliable Change Indices |
---|---|
Description: | The concept of reliable and clinically significant change (Jacobson & Truax, 1991) helps you answer the following questions for a sample with two measurements at different points in time (pre & post): Which proportion of my sample has a (considering the reliability of the instrument) probably not-just-by-chance difference in pre- vs. post-scores? Which proportion of my sample does not only change in a statistically significant way (see question one), but also in a clinically significant way (e.g. change from a test score regarded "dysfunctional" to a score regarded "functional")? This package allows you to very easily create a scatterplot of your sample in which the x-axis maps to the pre-scores, the y-axis maps to the post-scores and several graphical elements (lines, colors) allow you to gain a quick overview about reliable changes in these scores. An example of this kind of plot is Figure 2 of Jacobson & Truax (1991). Referenced article: Jacobson, N. S., & Truax, P. (1991) <doi:10.1037/0022-006X.59.1.12>. |
Authors: | Maximilian Hagspiel [aut, cre, cph] |
Maintainer: | Maximilian Hagspiel <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1 |
Built: | 2024-10-11 06:30:05 UTC |
Source: | CRAN |
Create a scatterplot of your sample in which the x-axis maps to the pre-scores, the y-axis maps to the post-scores and several graphical elements (lines, colors) allow you to gain a quick overview about reliable changes in these scores. An example of this kind of plot is Figure 2 of Jacobson & Truax (1991). Jacobson-Truax classification (represented in point colors) is always based on 'recovery_cutoff', not on any other plotted horizontal line (e.g. mid of means).
rciplot( data, pre = NULL, post = NULL, group = NULL, reliability = NULL, reliable_change_alpha = 0.05, recovery_cutoff = NULL, classification_method = "recovery cutoff", show_classification_counts = TRUE, show_classification_percentages = TRUE, higher_is_better = TRUE, pre_jitter = 0, post_jitter = 0, opacity = 0.5, size_points = 1, size_lines = 0.3, draw_meanmid_line = FALSE, draw_2sd_functional_line = FALSE, draw_2sd_dysfunctional_line = FALSE, mean_functional = NULL, mean_dysfunctional = NULL, sd_functional = 1, sd_dysfunctional = 1 )
rciplot( data, pre = NULL, post = NULL, group = NULL, reliability = NULL, reliable_change_alpha = 0.05, recovery_cutoff = NULL, classification_method = "recovery cutoff", show_classification_counts = TRUE, show_classification_percentages = TRUE, higher_is_better = TRUE, pre_jitter = 0, post_jitter = 0, opacity = 0.5, size_points = 1, size_lines = 0.3, draw_meanmid_line = FALSE, draw_2sd_functional_line = FALSE, draw_2sd_dysfunctional_line = FALSE, mean_functional = NULL, mean_dysfunctional = NULL, sd_functional = 1, sd_dysfunctional = 1 )
data |
Dataframe containing all relevant data |
pre |
Name of the column in 'data' containing pre values |
post |
Name of the column in 'data' containing post values |
group |
Name of column by which cases are to be grouped (controls shape of scatter plot points) |
reliability |
Reliability of the used test / instrument |
reliable_change_alpha |
Probability of alpha error for the calculation of the critical distance which is the minimum pre-post difference to be regarded statistically significant |
recovery_cutoff |
Test score below which individuals are considered healthy / recovered |
classification_method |
What cutoff value is to be used to classify individuals into healthy / unhealthy individuals? Possible values: "recovery cutoff" = the so-named function parameter, "mid of means" = the exact numeric mid between the two function parameters mean_functional and mean_dysfunctional, "2 sd dysfunctional" = everybody with a score higher than 2 SD above the dysfunctional group mean is healthy "2 sd functional" = everybody with a score higher than 2 SD below the functional group mean is healthy |
show_classification_counts |
If TRUE, show number of cases for each classification (e.g. reliable improvement, no reliable change, ...) in legend |
show_classification_percentages |
Expanding on 'show_classification_counts'.If TRUE, show the respective percentage of the whole sample each classification makes up. |
higher_is_better |
TRUE if higher values indicate a remission / healthy individual. FALSE if higher values indicate worse health. |
pre_jitter |
Jitter factor to apply to pre values |
post_jitter |
Jitter factor to apply to post values |
opacity |
Alpha value of scatter plot points |
size_points |
Size of scatter plot points. |
size_lines |
Size (thickness) of lines in plot. |
draw_meanmid_line |
Draw a horizontal line indicating the middle between the population means for a functional (healthy) population and a dysfunctional (diseased) population, described as criterion *c* in Jacobson & Truax (1991). |
draw_2sd_functional_line |
Draw a horizontal line indicating a cutoff at a 2 SD distance from 'mean_functional', described as criterion *b* in Jacobson & Truax (1991). |
draw_2sd_dysfunctional_line |
Draw a horizontal line indicating a cutoff at a 2 SD distance from 'mean_dysfunctional', described as criterion *a* in Jacobson & Truax (1991). |
mean_functional |
Required if 'draw_meanmid_line = T' or 'draw_2sd_[dys]functional_line = T'. Mean test score of the functional population. |
mean_dysfunctional |
Required if 'draw_meanmid_line = T' or 'draw_2sd_[dys]functional_line'. Mean test score of the dysfunctional population. |
sd_functional |
Optional for 'draw_meanmid_line = T'. Standard deviation of the functional population. |
sd_dysfunctional |
Optional for 'draw_meanmid_line = T'. Standard deviation of the dysfunctional population. |
A list containing:
higher_is_better |
Exactly the input parameter higher_is_better
|
reliable_change |
Pre-Post differences larger than this difference are regarded reliable |
plot |
ggplot2 scatter plot analogous to Figure 2 of Jacobson & Truax (1991) |
categorization |
List containing categorization of all samples given in data .
Thus, has as many items as data has rows.
|
# Using example data from `sample_data.rda` to recreate Figure 2 of # Jacobson & Truax (1991): rciplot( data = sample_data, pre = 'pre_data', post = 'post_data', reliability = 0.88, recovery_cutoff = 104, opacity = 1 )
# Using example data from `sample_data.rda` to recreate Figure 2 of # Jacobson & Truax (1991): rciplot( data = sample_data, pre = 'pre_data', post = 'post_data', reliability = 0.88, recovery_cutoff = 104, opacity = 1 )
This data set is an excerpt from Table 2 of Jacobson & Truax (1991).
sample_data
sample_data
A CSV table containing the columns 'ppid', 'pre' and 'post' where 'ppid' is a continuously incrementing list of unique integers, 'pre' contains pretest values (floating-point) and 'post' contains posttest values (floating-point too)
Table 2 in Jacobson & Truax (1991)
Jacobson, N. S., & Truax, P. (1991). Clinical Significance: A Statistical Approach to Defining Meaningful Change in Psychotherapy Research. Journal of Consulting and Clinical Psychology, 59, 12-19. <doi:10.1037/0022-006X.59.1.12>