Running 'phtMCMC.R' [175s]
  Running 'phtMCMC2.R' [168s]
Running the tests in 'tests/phtMCMC.R' failed.
Complete output:
  > library(PhaseType)
  > 
  > set.seed(576734884)
  > 
  > # I) Basic test of function
  > x <- c(1.45353415045187, 1.85349532001349, 2.01084961814576, 0.505725921290172, 
  + 1.56252630012213, 3.41158665930278, 1.52674487509487, 4.3428662377235, 
  + 8.03208018151311, 2.41746547476986, 0.38828086509283, 2.61513815012196, 
  + 3.39148865480856, 1.82705817807965, 1.42090953713845, 0.851438991331866, 
  + 0.0178808867191894, 0.632198596390046, 0.959910259815998, 1.83344199966323)
  > 
  > # Prior on starting state
  > dirpi <- c(1, 0, 0)
  > # Gamma prior: shape hyperparameters (one per matrix element, columnwise)
  > nu <- c(24, 24, 1, 180, 1, 24, 180, 1, 24)
  > # Gamma prior: reciprocal scale hyperparameters (one per matrix row)
  > zeta <- c(16, 16, 16)
  > # Define dimension of model to fit
  > n <- 3
  > # Perform 6 MCMC iterations (fix inner Metropolis-Hastings to one iteration
  > # since starts in stationarity here)
  > print(phtMCMC(x, n, dirpi, nu, zeta, 6, mhit=1), digits=2)
  Setting up Gibbs run ...
  Starting phase-type MCMC sampler ...
  
  Begining processing ...
  Processing iteration 2 of 6 (33.3%)
  
  Processing iteration 3 of 6 (50.0%)
  
  Processing iteration 4 of 6 (66.7%)
  
  Processing iteration 5 of 6 (83.3%)
  
  Processing iteration 6 of 6 (100.0%)
  
  Completed MCMC run, returning results ...
  MCMC chain of length 6 iterations for Phase-type inference on matrix structure:
       [,1] [,2] [,3] [,4]
  [1,] 0    S12  S13  s1  
  [2,] S21  0    S23  s2  
  [3,] S31  S32  0    s3  
  [4,] 0    0    0    0   
  
  Priors:
  S12 ~ Gamma(shape=24, scale=1/16)
  S13 ~ Gamma(shape=24, scale=1/16)
  S21 ~ Gamma(shape=180, scale=1/16)
  S23 ~ Gamma(shape=1, scale=1/16)
  S31 ~ Gamma(shape=180, scale=1/16)
  S32 ~ Gamma(shape=1, scale=1/16)
  s1 ~ Gamma(shape=1, scale=1/16)
  s2 ~ Gamma(shape=24, scale=1/16)
  s3 ~ Gamma(shape=24, scale=1/16)
  
  Original data consist 20 observations
  
  Posterior sample mean and standard deviation for each variable, plus standard error of the mean:
        Mean    SD Naive SE Time-series SE
  S12  1.686 0.220    0.090          0.090
  S13  1.341 0.184    0.075          0.075
  S21 11.374 0.493    0.201          0.058
  S23  0.060 0.083    0.034          0.034
  S31 11.061 0.331    0.135          0.135
  S32  0.095 0.095    0.039          0.039
  s1   0.280 0.145    0.059          0.059
  s2   1.409 0.374    0.153          0.153
  s3   1.381 0.227    0.093          0.038
  
  Posterior quantiles for each variable:
         2.5%    25%    50%    75% 97.5%
  S12  1.4467  1.551  1.673  1.734  2.03
  S13  1.0926  1.202  1.426  1.439  1.52
  S21 10.7433 11.039 11.385 11.734 11.96
  S23  0.0058  0.021  0.031  0.045  0.20
  S31 10.6282 10.841 11.109 11.231 11.48
  S32  0.0164  0.027  0.077  0.109  0.25
  s1   0.0623  0.218  0.300  0.374  0.44
  s2   0.8662  1.289  1.423  1.571  1.89
  s3   1.1065  1.222  1.360  1.586  1.64
  > 
  > proc.time()
     user  system elapsed 
     0.96    0.18    1.14 
Running the tests in 'tests/phtMCMC2.R' failed.
Complete output:
  > library(PhaseType)
  > 
  > set.seed(34752076)
  > 
  > # I) Basic test of function
  > x <- c(1.45353415045187, 1.85349532001349, 2.01084961814576, 0.505725921290172,
  + 1.56252630012213, 3.41158665930278, 1.52674487509487, 4.3428662377235,
  + 8.03208018151311, 2.41746547476986, 0.38828086509283, 2.61513815012196,
  + 3.39148865480856, 1.82705817807965, 1.42090953713845, 0.851438991331866,
  + 0.0178808867191894, 0.632198596390046, 0.959910259815998, 1.83344199966323)
  > 
  > # Prior on starting state
  > dirpi <- c(1, 0, 0)
  > # Define the structure of the Phase-type generator
  > TT <- matrix(c(0,"R","R",0,"F",0,0,0,"F",0,0,0,0,"F","F",0), 4)
  > # Gamma prior: shape hyperparameters (one per model parameter)
  > nu <- list("R"=180, "F"=24)
  > # Gamma prior: reciprocal scale hyperparameters (one per model parameter)
  > zeta <- c("R"=16,"F"=16)
  > # Perform 6 MCMC iterations
  > print(phtMCMC2(x, TT, dirpi, nu, zeta, 20), digits=2)
  Setting up Gibbs run ...
  Starting phase-type MCMC sampler ...
  
  Begining processing ...
  Processing iteration 2 of 20 (10.0%)
  
  Processing iteration 3 of 20 (15.0%)
  
  Processing iteration 4 of 20 (20.0%)
  
  Processing iteration 5 of 20 (25.0%)
  
  Processing iteration 6 of 20 (30.0%)
  
  Processing iteration 7 of 20 (35.0%)
  
  Processing iteration 8 of 20 (40.0%)
  
  Processing iteration 9 of 20 (45.0%)
  
  Processing iteration 10 of 20 (50.0%)
  
  Processing iteration 11 of 20 (55.0%)
  
  Processing iteration 12 of 20 (60.0%)
  
  Processing iteration 13 of 20 (65.0%)
  
  Processing iteration 14 of 20 (70.0%)
  
  Processing iteration 15 of 20 (75.0%)
  
  Processing iteration 16 of 20 (80.0%)
  
  Processing iteration 17 of 20 (85.0%)
  
  Processing iteration 18 of 20 (90.0%)
  
  Processing iteration 19 of 20 (95.0%)
  
  Processing iteration 20 of 20 (100.0%)
  
  Completed MCMC run, returning results ...
  MCMC chain of length 20 iterations for Phase-type inference on matrix structure:
       [,1] [,2] [,3] [,4]
  [1,] 0    F    F    0   
  [2,] R    0    0    F   
  [3,] R    0    0    F   
  [4,] 0    0    0    0   
  
  Priors:
  F ~ Gamma(shape=24, scale=1/16)
  R ~ Gamma(shape=180, scale=1/16)
  
  Original data consist 20 observations
  
  Posterior sample mean and standard deviation for each variable, plus standard error of the mean:
    Mean   SD Naive SE Time-series SE
  F  1.8 0.26    0.059           0.14
  R 10.9 0.75    0.168           0.17
  
  Posterior quantiles for each variable:
    2.5%  25%  50%  75% 97.5%
  F  1.4  1.7  1.8  1.9   2.3
  R  9.3 10.6 11.1 11.3  12.1
  > 
  > proc.time()
     user  system elapsed 
     0.81    0.21    1.00