Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: VaR
See also: VaRRatMigRate VaRRatMigRateM conting VaRcredN

Quantlet: VaRRatMigCount
Description: Derives the matrix of migration counts from the matrix of migration events

Link:
Usage: counts = VaRRatMigCount (d,e)
Input:
d scalar, number of categories (incl. default)
e n x 2 matrix of migration events. Each row of the matrix corresponds to an event - migration from state i to state j.
Output:
counts d-1 x d matrix containing counts of migrations, i.e., the (i,j)-th element of the matrix contains the number of migrations from state i to state j.

Note:

Example:
library("VaR")
e=#(1,1,1,1,2,2,1,1,2,2,2)~#(1,1,1,2,3,2,3,2,2,3,2)
counts=VaRRatMigCount(3,e)
counts

Result:
Contents of counts
[1,]        3        2        1
[2,]        0        3        2



Author: S. Hoese, S. Huschens, R. Wania, 20011005
(C) MD*TECH Method and Data Technologies, 05.02.2006