pem | R Documentation |
The pem
function returns the percentage of phase B data exceeding the
phase A median. Additionally, a chi square test against a 50/50
distribution is computed. Different measures of central tendency can be
addressed for alternative analyses.
pem(
data,
dvar,
pvar,
decreasing = FALSE,
binom.test = TRUE,
chi.test = FALSE,
FUN = median,
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
|
binom.test |
Computes a binomial test for a 50/50 distribution. Default
is |
chi.test |
Computes a Chi-square test. The default setting
|
FUN |
Data points are compared with the phase A median. Use this
argument to implement alternative measures of central tendency. Default is
|
phases |
A vector of two characters or numbers indicating the two phases
that should be compared. E.g., |
... |
Additional arguments for the |
Juergen Wilbert
Other overlap functions:
cdc()
,
nap()
,
overlap()
,
pand()
,
pet()
,
pnd()
,
tau_u()
## Calculate the PEM including the Binomial and Chi-square tests for a single-case
dat <- random_scdf(5, level = 0.5)
pem(dat, chi.test = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.