Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong conversion of absorbing states #211

Open
Enchufa2 opened this issue Jan 19, 2023 · 0 comments
Open

Wrong conversion of absorbing states #211

Enchufa2 opened this issue Jan 19, 2023 · 0 comments

Comments

@Enchufa2
Copy link
Contributor

Enchufa2 commented Jan 19, 2023

A simple example of the conversion of a generator matrix with an absorbing state to the corresponding transition matrix of the embedded chain:

library(markovchain)

Q <- matrix(c(-1, 1, 0, 0), byrow=TRUE, nrow=2)
generatorToTransitionMatrix(Q)
#>      [,1] [,2]
#> [1,]    0    1
#> [2,]  NaN    0

For absorbing states, NaN should be 0s, and 0s should be 1s. So the second row should be 0 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant