R: Return the generator matrix for a corresponding transition...

transition2Generator {markovchain} | R Documentation

## Return the generator matrix for a corresponding transition matrix

### Description

Calculate the generator matrix for a corresponding transition matrix

### Usage

    transition2Generator(P, t = 1, method = "logarithm")

### Arguments

`P` | transition matrix between time 0 and t
`t` | time of observation
`method` | "logarithm" returns the Matrix logarithm of the transition matrix

### Value

A matrix that represent the generator of P

### See Also

`rctmc`

### Examples

    mymatr <- matrix(c(.4, .6, .1, .9), nrow = 2, byrow = TRUE)
    Q <- transition2Generator(P = mymatr)
    expm::expm(Q)

[Package markovchain version 0.8.6 Index]