Library: | VaR |
See also: | VaRRatMigCount VaRRatMigRate VaRcredN |
Quantlet: | VaRRatMigRateM | |
Description: | computes the m-period transition rates. Standard deviations of the transition rates are estimated by bootstrap. |
Usage: | out = VaRRatMigRateM(c, m{, B}) | |
Input: | ||
c | 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. | |
m | scalar, number of periods | |
B | optional, scalar, number of bootstrap samples, default is 250 | |
Output: | ||
out.btm | d-1 x d x B array containing B simulated bootstrap transition matrices | |
out.etm | d-1 x d matrix representing m-period transition rates | |
out.stm | d-1 x d matrix containing the bootstrap estimator of standard deviations |
library("VaR") ; loads quantlets of VaR library randomize(0) c=#(3,0)~#(2,3)~#(1,2) ; matrix of migration counts m=5 ; number of periods B=250 ; number of bootstrap samples out=VaRRatMigRateM(c,m,B) out.etm out.stm
Note that out.btm is too large to show. Contents of etm [1,] 0.031 0.155 0.814 [2,] 0 0.078 0.922 Contents of stm [1,] 0.179 0.185 0.242 [2,] 0 0.274 0.274