R/compdelta.R

"compdelta" <-
function(Pi){
    #   From Zucchini Sydney notes
    #   Calculate delta assuming stationarity
    m <- ncol(Pi)
    a <- t(Pi) - diag(1, m, m)
    a[m,] <- 1
    b <- c(rep(0, (m-1)), 1)
    delta <- solve(a, b)
    return(delta)
}

Try the HiddenMarkov package in your browser

Any scripts or data that you put into this service are public.

HiddenMarkov documentation built on April 27, 2021, 5:06 p.m.