View source: R/rand_test.R View source: R/nap.R
nap | R Documentation |
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 where ties are
counted as half non-overlaps. Because NAP can take values between 0 and 100
percent where values below 50 percent indicate an inverse effect, an nap
rescaled from -100 to 100 percent where negative
values indicate an inverse effect is also displayed (nap_{rescaled} = 2
* nap - 100
).
nap(data, dvar, pvar, decreasing = FALSE, phases = c(1, 2))
data |
A single-case data frame. See |
dvar |
Character string with the name of the dependent variable. Defaults to the attributes in the scdf file. |
pvar |
Character string with the name of the phase variable. Defaults to the attributes in the scdf file. |
decreasing |
If you expect data to be lower in the B phase, set
|
phases |
A vector of two characters or numbers indicating the two phases
that should be compared. E.g., |
nap | A data frame with NAP and additional values for each case. |
N | Number of cases. |
Juergen Wilbert
Parker, R. I., & Vannest, K. (2009). An improved effect size for single-case research: Nonoverlap of all pairs. Behavior Therapy, 40, 357-367.
Other overlap functions:
cdc()
,
ird()
,
overlap()
,
pand()
,
pem()
,
pet()
,
pnd()
,
tau_u()
## Calculate NAP for a study with lower expected phase B scores
## (e.g. aggressive behavior)
gretchen <- scdf(c(A = 12, 14, 9, 10, B = 10, 6, 4, 5, 3, 4))
nap(gretchen, decreasing = TRUE)
## Request NAP for all cases from the Grosche2011 scdf
nap(Grosche2011)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.