disprop | R Documentation |
Calculates the magnitude of disproportionality for values within a dataset.
disprop(z)
z |
|
Calculates the magnitude of disproportionality for each value within the data by dividing
the difference between each value and the median by the difference between the hot spot cutoff,
(Ch
, as calculated by the function hotspots
), and the median:
disproportionality = (x - med(x)) / (Ch - med(x))
Using this equation, all hot spots have a magnitude of disproportionality of > 1. Increasingly skewed distributions (for example, lognormal distributions with higher standard deviation) will have higher magnitudes of disproportionality for some of their values.
A list containing the objects positive
, negative
, or both, depending on the which tails were
calculated in the hotspots
object. These objects are numeric vectors of the magnitudes of disproportionality.
NA values are preserved.
Anthony Darrouzet-Nardi
hotspots
rln30 <- sort(c(rlnorm(15),rlnorm(15)*-1,NA), na.last = TRUE)
rln30
disprop(hotspots(rln30, tail = "both"))
#higher levels of disproportionality
rln30sd2 <- sort(c(rlnorm(15,sd = 3),rlnorm(15,sd = 3)*-1,NA), na.last = TRUE)
rln30sd2
disprop(hotspots(rln30sd2, tail = "both"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.