R/p.log.update.r

#####################################################################################
# Update functions for the parameters which for an explicit solution does not exist #
# Solutions are calculated inside EM using root-finding algorithms                  #
#####################################################################################

# Update function for p.log
# ------------------------
p.log.update <- function(p, j, M, eta){
  x <- sum(eta[1:M, j] * (1 / p * 1:M + 1 / (1 - p) / log(1 - p)))
  return(x)
  }

Try the hsmm package in your browser

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

hsmm documentation built on May 2, 2019, 12:32 p.m.