Running examples in ‘hhsmm-Ex.R’ failed
The error most likely occurred in:

> ### Name: make_model
> ### Title: make a hhsmmspec model
> ### Aliases: make_model
> 
> ### ** Examples
> 
> J <- 3
> initial <- c(1,0,0)
> semi <- c(FALSE,TRUE,FALSE)
> P <- matrix(c(0.8, 0.1, 0.1, 0.5, 0, 0.5, 0.1, 0.2, 0.7), nrow = J, byrow=TRUE)
> par <- list(mu = list(list(7,8),list(10,9,11),list(12,14)),
+ sigma = list(list(3.8,4.9),list(4.3,4.2,5.4),list(4.5,6.1)),
+ mix.p = list(c(0.3,0.7),c(0.2,0.3,0.5),c(0.5,0.5)))
> sojourn <- list(shape = c(0,3,0), scale = c(0,10,0), type = "gamma")
> model <- hhsmmspec(init = initial, transition = P, parms.emis = par,
+ dens.emis = dmixmvnorm, sojourn = sojourn, semi = semi)
> train <- simulate(model, nsim = c(10,8,8,18), seed = 1234, remission = rmixmvnorm)
> clus = initial_cluster(train,nstate=3,nmix=c(2,2,2),ltr=FALSE,
+ final.absorb=FALSE,verbose=TRUE)
Within sequence clustering ... 
State  1 
Between sequence clustering ... 
State  2 
Between sequence clustering ... 
State  3 
Between sequence clustering ... 
> par = initial_estimate(clus,verbose=TRUE)
Intitial estimation .... 
State  1  estimation 

[..        ] 25%
[.....     ] 50%
[.......   ] 75%
[..........] 100%
Mixture component  1  estimation
Mixture component  2  estimation
State  2  estimation 

[..        ] 25%
[.....     ] 50%
[.......   ] 75%
[..........] 100%
Mixture component  1  estimation
Mixture component  2  estimation
State  3  estimation 

[..        ] 25%
[.....     ] 50%
[.......   ] 75%
[..........] 100%
Mixture component  1  estimation
Mixture component  2  estimation
> model = make_model(par,semi=NULL,M=max(train$N),sojourn="auto")
Warning in chisq.test(x = observed, p = expected.gamma) :
  Chi-squared approximation may be incorrect
Warning in chisq.test(x = observed, p = expected.lnorm) :
  Chi-squared approximation may be incorrect
Warning in chisq.test(x = observed, p = expected.poisson) :
  Chi-squared approximation may be incorrect
Warning in chisq.test(x = observed, p = expected.weibull) :
  Chi-squared approximation may be incorrect
Warning in chisq.test(x = observed, p = expected.nbinom) :
  Chi-squared approximation may be incorrect
Warning in chisq.test(x = observed, p = expected.log) :
  Chi-squared approximation may be incorrect
Warning in min(which(d0jc >= 0.1 * t)) :
  no non-missing arguments to min; returning Inf
Error in breaks[l]:(breaks[l + 1] - 1) : 
  result would be too long a vector
Calls: make_model
Execution halted