Learn R Programming

poseticDataAnalysis (version 1.0.0)

LexSeparation: Separation matrices computation over the set of lexicographic linear extensions.

Description

Considering the component-wise poset built stating from \(k\) ordinal variables, computes separation matrices by analyzing all poset lexicographic linear extensions.

Usage

LexSeparation(nvar, deg, type, ...)

Value

list of required separation matrices.

Arguments

nvar

positive integer specifying the number \(k\) of ordinal variables.

deg

parameter specifying the number of degrees of each variable. If all \(k\) variables have the same number \(m\) of degrees, it can be:

  1. the positive integer \(m\). In this case variable degree labels are supposed to be the integers \(0<1<...<m\) and columns and rows of computed separation matrices are named accordingly to this;

  2. a character vector of length \(m\) specifying the variable degree labels (in this case columns and rows of computed separation matrices are named accordingly to deg).

If the \(k\) variables have different number \((m_1,...,m_k)\) of degrees, it can be:

  1. a length-\(k\) positive integers vector specifying the values of \(m_1,...,m_k\). In this case variable degree labels for the \(j\)-th variable are supposed to be the integers \(0<1<...<m_j\) and columns and rows of computed separation matrices are named accordingly to this;

  2. a list of \(k\) character vectors. The \(j\)-th list element is a character vector of length \(m_j\) specifying the degree labels for the \(j\)-th variable (in this case columns and rows of computed separation matrices are named accordingly to deg).

type

type of separation matrix to be computed. Possible choices are: "symmetric", "asymmetricLower", "asymmetricUpper", "vertical", "horizontal".

...

additional types of separations to be computed. Possible choices are: "symmetric", "asymmetricLower", "asymmetricUpper", "vertical", "horizontal".

Examples

Run this code

#variables with common number of degrees
# default labels for variable degrees
nvar <- 3
deg  <- 4
LexSep <- LexSeparation(nvar=nvar, deg=deg, type= "symmetric", "asymmetricLower")

#user supplied variable degree labels
nvar <- 3
deg  <- c("a","b","c","d")
LexSep <- LexSeparation(nvar=nvar, deg=deg, type= "symmetric", "asymmetricLower")


#variables with different numbers of degrees
# default labels for variable degrees
nvar <- 3
deg  <- c(4,2,3)
LexSep <- LexSeparation(nvar=nvar, deg=deg, type= "symmetric", "asymmetricLower")

#user supplied variable degree labels
nvar <- 3
deg  <- list(c("a","b","c","d"),c("0","1"),c("x","y","z"))
LexSep <- LexSeparation(nvar=nvar, deg=deg, type= "symmetric", "asymmetricLower")

Run the code above in your browser using DataLab