decompose | R Documentation |
prcalc
object.Decomposition using a prcalc
object.
decompose(x, alpha = 2, special = NULL, ...)
## S3 method for class 'prcalc'
decompose(x, alpha = 2, special = NULL, ...)
x |
a |
alpha |
Default is |
special |
a character. names of special district. If it is defined, three-step decomposition is conducted. |
... |
ignored |
a prcalc_decomposition
object.
Yuta, Kamahara. "The Desired Political Entropy as the Measure of Unequal Representation: Disproportionality and Malapportionment". Working paper.
decompose2
, decompose3
# two-step decomposition (example 1)
data("jp_lower_2021")
obj <- prcalc(jp_lower_2021,
m = c(8, 14, 20, 21, 17, 11, 21, 30, 11, 6, 21),
method = "hare")
decompose(obj)
# two-step decomposition (example 2)
data("au_district_2010")
au_data <- au_district_2010 |>
as_prcalc(l1 = "region",
l2 = "district",
p = "electorates",
q = "magnitude",
type = "nested")
decompose(au_data, alpha = 0)
# three-step decomposition
data("nz_district")
nz_district |>
dplyr::filter(year == 2011) |>
as_prcalc(l1 = "region",
l2 = "district",
p = "electorates",
q = "magnitude",
type = "nested") |>
decompose(alpha = 0, special = "Maori")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.