Percent exceeding the median
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
## Calculate the PEM including the Binomial and Chi-square tests for a single-case dat <- rSC(5, level = 0.5) pem(dat, chi.test = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.