Reliable Change Index (RCI) — SCIA - Single Case Intervention Analysis with Python

Skip to main content
`Ctrl`+`K`

# Reliable Change Index (RCI)

The `rci` function calculates the Reliable Change Index (RCI) for single-case data. It provides a statistical assessment of whether the change between two phases (typically A and B) is statistically reliable, considering measurement error and reliability.

## Function Overview

The `rci` function computes the RCI for a single-case dataset. It prints descriptive statistics, confidence intervals, and RCI values for the specified phases.

### Arguments

- `data`: DataFrame containing SCED data (single case only).

- `dvar`: Name of the dependent variable column (default: “values”).

- `pvar`: Name of the phase variable column (default: “phase”).

- `rel`: Reliability of the measurement (default: 0.8).

- `ci`: Confidence level (default: 0.95).

- `graph`: Whether to display a graph of confidence intervals (default: False).

- `phases`: Tuple of phases to include (default: (“A”, “B”)).

The function prints all results directly and does not return a value.

    import scia as sc

    📖 scia 1.101.0.dev6 - For Documentation, visit: https://ahsankhodami.github.io/scia/intro.html

## Example 1: Single-Case RCI Calculation

    # Create a single-case AB design
    df = sc.create_scd(
        values=[5, 7, 8, 5, 7, 12, 16, 18, 15, 14, 19],
        phase_starts={"A": 1, "B": 6}
    )

    # Compute and print RCI
    sc.rci(df)

    Reliable Change Index

    Mean Difference = 9.267
    Standardized Difference = 1.768
    Standard error of differences = 0.849
    Reliability of measurements = 0.8

    Descriptives:
             n       mean        SD        SE
    A-Phase  5   6.400000  1.341641  0.600000
    B-Phase  6  15.666667  2.581989  1.154701

    95% Confidence Intervals:
                 Lower      Upper
    A-Phase   5.217270   7.582730
    B-Phase  13.390501  17.942832

    Reliable Change Indices:
                                   RCI
    Jacobson et al.          15.444444
    Christensen and Mendoza  10.920871

## Example 2: RCI for Each Case in a Multiple-Case Design

The `rci` function is designed for single-case data. To use it with multiple cases, simply call it for each case in your list.

    # Create multiple cases
    charlotte_test = sc.create_scd(
        values={"A": [5, 7, 10, 5, 12], "B": [7, 10, 18, 15, 14, 19]},
        name="Charlotte",
        mt=list(range(11))
    )

    theresa_test = sc.create_scd(
        values={"A": [3, 4, 3, 5], "B": [7, 4, 7, 9, 8, 10, 12]},
        name="Theresa",
        mt=list(range(11))
    )

    antonia_test = sc.create_scd(
        values={"A": [9, 8, 8, 7, 5, 7], "B": [6, 14, 15, 12, 16]},
        name="Antonia",
        mt=list(range(11))
    )

    mbd_test = [charlotte_test, theresa_test, antonia_test]

    # Compute and print RCI for each case
    for case in mbd_test:
        print(f"\nCase: {case['case'].iloc[0]}")
        sc.rci(case)

    Case: Charlotte
    Reliable Change Index

    Mean Difference = 6.033
    Standardized Difference = 1.219
    Standard error of differences = 1.970
    Reliability of measurements = 0.8

    Descriptives:
             n       mean        SD        SE
    A-Phase  5   7.800000  3.114482  1.392839
    B-Phase  6  13.833333  4.622409  2.067204

    95% Confidence Intervals:
                Lower      Upper
    A-Phase  5.067867  10.532133
    B-Phase  9.778394  17.888273

    Reliable Change Indices:
                                  RCI
    Jacobson et al.          4.331681
    Christensen and Mendoza  3.062961

    Case: Theresa
    Reliable Change Index

    Mean Difference = 4.393
    Standardized Difference = 1.458
    Standard error of differences = 0.606
    Reliability of measurements = 0.8

    Descriptives:
             n      mean        SD        SE
    A-Phase  4  3.750000  0.957427  0.428174
    B-Phase  7  8.142857  2.544836  1.138085

    95% Confidence Intervals:
                Lower      Upper
    A-Phase  2.909551   4.590449
    B-Phase  5.908949  10.376765

    Reliable Change Indices:
                                   RCI
    Jacobson et al.          10.259504
    Christensen and Mendoza   7.254565

    Case: Antonia
    Reliable Change Index

    Mean Difference = 5.267
    Standardized Difference = 1.368
    Standard error of differences = 0.864
    Reliability of measurements = 0.8

    Descriptives:
             n       mean        SD        SE
    A-Phase  6   7.333333  1.366260  0.611010
    B-Phase  5  12.600000  3.974921  1.777639

    95% Confidence Intervals:
                Lower      Upper
    A-Phase  6.087089   8.579577
    B-Phase  8.974247  16.225753

    Reliable Change Indices:
                                  RCI
    Jacobson et al.          8.619607
    Christensen and Mendoza  6.094982