gm.default: Generator Matrix Estimation

gm.defaultR Documentation

Generator Matrix Estimation

Description

Default function to estimate the parameters of a continuous Markov chain

Usage

## Default S3 method:
gm(tm, te, method, gmguess = NULL, prior = NULL, burnin = NULL, 
eps = 1e-06, conv_pvalue = 0.05, conv_freq = 10, niter = 10000, sampl_func = NULL, 
combmat = NULL, sampl_method = "Unif", logmethod = "Eigen", expmethod = "PadeRBS", 
verbose = FALSE, ...)

Arguments

tm

matrix of either absolute transition frequencies (if method is "EM" or "GS") or relative transition frequencies (if method is "DA", "WA" of "QO")

te

time elapsed in transition process

method

method to derive generator matrix: "DA" - Diagonal Adjustment, "WA" - Weighted Adjustment, "QO" - Quasi-Optimization, "EM" - Expectation-Maximization Algorithm, "GS" - Gibbs Sampler

gmguess

initial guess for generator matrix estimation procedure (if method is "EM")

prior

prior parametrization (if method is "GS")

burnin

burn-in period (if method is "GS")

eps

convergence criterion (if method is "EM" or "GS")

conv_pvalue

convergence criterion: stop, if Heidelberger and Welch's diagnostic assumes convergence (see coda package)

conv_freq

convergence criterion: absolute frequency of convergence evaluations

niter

maximum number of iterations (if method is "EM" or "GS")

sampl_func

optional self-written path sampling function for endpoint-conditioned Markov processes (if method is "GS")

combmat

matrix stating combined use of modified rejection sampling / uniformization sampling algorithms (if method is "GS")

sampl_method

sampling method for deriving endpoint-conditioned Markov process path: "Unif" - Uniformization Sampling, "ModRej" - Modified Rejection Sampling (if method is "GS")

logmethod

method to compute matrix logarithm (if method is "DA", "WA" or "QO", see ?logm from expm package for more information)

expmethod

method to compute matrix exponential (if method is "EM" or "GS", see ?expm from expm package for more information)

verbose

verbose mode (if method is "EM" or "GS")

...

additional arguments

Details

The methods "DA", "WA" and "QO" provide adjustments of a matrix logarithm based candidate solution, "EM" gives the maximum likelihood estimate and "GS" a posterior mean estimate in a Bayesian setting with conjugate Gamma priors.

Value

generator matrix estimate

Author(s)

Marius Pfeuffer

References

M. Pfeuffer: Generator Matrix Approximation Based on Discrete Time Rating Migration Data. Master Thesis, University of Munich, 2016

Y. Inamura: Estimating Continuous Time Transition Matrices from Discretely Observed Data. Bank of Japan Working Paper Series, 2006

R. B. Israel et al.: Finding Generators for Markov Chains via Empirical Transition Matrices, with Applications to Credit Ratings. Mathematical Finance 11(2):245-265, 2001

E. Kreinin and M. Sidelnikova: Regularization Algorithms for Transition Matrices. Algo Research Quarterly 4(1):23-40, 2001

M. Bladt and M. Soerensen: Statistical Inference for Discretely Observed Markov Jump Processes. Journal of the Royal Statistical Society B 67(3):395-410, 2005

See Also

gmDA, gmWA, gmQO, gmEM, gmGS

Examples

data(tm_abs)

## Maximum Likelihood Generator Matrix Estimate
gm0=matrix(1,8,8)
diag(gm0)=0
diag(gm0)=-rowSums(gm0)
gm0[8,]=0

gmem=gm(tm_abs,te=1,method="EM",gmguess=gm0)
gmem

## Quasi Optimization Estimate
tm_rel=rbind((tm_abs/rowSums(tm_abs))[1:7,],c(rep(0,7),1))

gmqo=gm(tm_rel,te=1,method="QO")
gmqo

ctmcd documentation built on May 31, 2023, 7:55 p.m.