MakeScoreMatrix: MakeScoreMatrix

View source: R/MakeScoreMatrix.R

MakeScoreMatrixR Documentation

MakeScoreMatrix

Description

Given a CIB matrix, MakeScoreMatrix calculates the consistancy scores of every world state, as viewed from every other world state. It also calculates an adjacency of states which states which states are only differ in one descriptor, along with making an empty transition matrix to be filled in later using one of the TransitionCalculators. If you are interested in the consistancy scores from the point of view of a particular world state, simply examine the corresponding line of you resulting score matrix.

Usage

MakeScoreMatrix(TheList)

Arguments

TheList

A list, the first element of which is a CIB matrix, and the second of which is a vector describing the "shape" of the CIB matrix (a vector listing how many states per descriptor). The output of InputCibBanner is a suitable input for this function.

Value

A list containing a "Score" matrix found by summing the appropriate entries in your influence matrix, a blank transition matrix, and an adjacency matrix. The Consistance score matrix will be of direct interest to you who is using this, the later two matrices are mainly used to help R's internal calculations, and are probably of limited interest to anyone who is using this package. The score matrix gives the consistancy score of every world state from the point of view of every other (rows being the source state, columns the target state). The adjacency matrix identifies WHICH descriptor would need to be changed to move from one state to another, taking the value 0 if no descriptor is changed, or -1 if multiple descriptors must be changed. Positive values in the adjacency matrix occur when precisely one descriptor has been changed. The value of such positive entries specifies which descriptor is changed. Hence "A,$,X"–>"A,$,Z" will have a "3" in the adjacency matrix, while "A,$,X"–>"A,

Note

The output of this function makes suitable input for various TransitionCalculators.

Author(s)

Alastair Jamieson Lane. <aja107@math.ubc.ca>

Examples

data(ExampleCIBdata)
TransScoresAdj<-MakeScoreMatrix(ExampleCIBdata)
Scores<-TransScoresAdj[[2]]
Adjacency<-TransScoresAdj[[3]]
##Output the consistance scores assuming a particular state.
Scores["Pop-M $$$-H Edu-M",] 
Scores[3,] ##this is also valid.

alastair-JL/StochasticCIB documentation built on July 27, 2023, 1:12 a.m.