makePowerRelationMonotonic: Make Power Relation monotonic

View source: R/makePowerRelationMonotonic.R

makePowerRelationMonotonicR Documentation

Make Power Relation monotonic

Description

Given a powerRelation object, make its order monotonic.

Usage

makePowerRelationMonotonic(powerRelation, addMissingCoalitions = TRUE)

Arguments

powerRelation

A PowerRelation object created by PowerRelation() or as.PowerRelation()

addMissingCoalitions

If TRUE, also include all coalitions in the power set of powerRelation$elements that are not present in the current power relation.

Details

A power relation is monotonic if

T \subset S \Leftrightarrow S \succsim T.

for every coalition S \subseteq N.

Calling makePowerRelationMonotonic() on some PowerRelation object moves or adds coalitions to certain equivalence classes so that the power relation becomes monotonic.

Value

PowerRelation object containing the following values:

  • ⁠$elements⁠: vector of elements

  • ⁠$eqs⁠: equivalence classes. Nested list of lists, each containing vectors representing groups of elements in the same equivalence class

  • ⁠$coalitionLookup⁠: ⁠function(v)⁠ taking a coalition vector v and returning the equivalence class it belongs to. See coalitionLookup() for more.

  • ⁠$elementLookup⁠: ⁠function(e)⁠ taking an element e and returning a list of 2-sized tuples. See elementLookup() for more.

See Also

Other helper functions for transforming power relations: appendMissingCoalitions()

Examples

pr <- as.PowerRelation("ab > ac > abc > b > a > {} > c > bc")
makePowerRelationMonotonic(pr)
# (abc ~ ab) > ac > (bc ~ b) > a > (c ~ {})

# notice that missing coalitions are automatically added,
# except for the empty set
pr <- as.PowerRelation("a > b > c")
makePowerRelationMonotonic(pr)
# (abc ~ ab ~ ac ~ a) > (bc ~ b) > c

# setting addMissingCoalitions to FALSE changes this behavior
pr <- as.PowerRelation("a > ab > c ~ {} > b")
makePowerRelationMonotonic(pr, addMissingCoalitions = FALSE)
# (ab ~ a) > (b ~ c ~ {})

# notice that an equivalence class containing an empty coalition
# automatically moves all remaining coalitions to that equivalence class.
pr <- as.PowerRelation("a > {} > b > c")
makePowerRelationMonotonic(pr)
# (abc ~ ab ~ ac ~ a) > (bc ~ b ~ c ~ {})


socialranking documentation built on May 29, 2024, 2:10 a.m.