# nap: Nonoverlap of all Pairs In scan: Single-Case Data Analyses for Single and Multiple Baseline Designs

## Description

The `nap` function calculates the nonoverlap of all pairs (NAP; Parker & Vannest, 2009). NAP summarizes the overlap between all pairs of phase A and phase B data points. If an increase of phase B scores is expected, a non-overlapping pair has a higher phase B data point. The NAP equals number of pairs showing no overlap / number of pairs. Because NAP can only take values between 50 and 100 percent, a rescaled and therefore more intuitive NAP (0-100%) is also displayed.

## Usage

 `1` ```nap(data, decreasing = FALSE, phases = c("A", "B")) ```

## Arguments

 `data` A single-case data frame. See `scdf` to learn about this format. `decreasing` If you expect data to be lower in the B phase, set `decreasing = TRUE`. Default is `decreasing = FALSE`. `phases` A vector of two characters or numbers indicating the two phases that should be compared. E.g., `phases = c("A","C")` or `phases = c(2,4)` for comparing the second to the fourth phase. Phases could be combined by providing a list with two elements. E.g., ```phases = list(A = c(1,3), B = c(2,4))``` will compare phases 1 and 3 (as A) against 2 and 4 (as B). Default is `phases = c("A","B")`.

## Value

 `NAP` Nonoverlap of all pairs. `Rescaled NAP` NAP rescaled to 0-100%.

Juergen Wilbert

## References

Parker, R. I., & Vannest, K. (2009). An improved effect size for single-case research: Nonoverlap of all pairs. Behavior Therapy, 40, 357-367.

`overlapSC`, `describeSC`, `pand`, `pem`, `pet`, `pnd`
 ```1 2 3 4 5 6``` ```## Calculate NAP for a study with lower expected phase B scores (e.g. aggressive behavior) gretchen <- scdf(c(12,14,9,10,10,6,4,5,3,4), B.start = 5) nap(gretchen, decreasing = TRUE) ## Request NAP for all cases fom the Grosche2011 data lapply(Grosche2011, nap) ```