Loading required package: coda Loading required package: lattice Linked to JAGS 3.4.0 Loaded modules: basemod,bugs Loading required package: boot Attaching package: ‘boot’ The following object is masked from ‘package:lattice’: melanoma Loading required package: MASS Loading required package: segmented mixtools package, version 1.0.1, Released January 2014 This package is based upon work supported by the National Science Foundation under Grant No. SES-0518772. **************** Cleaning data for K3 Simulation JAGS @ 2 Removing 0 of 10 essays for length. Calculating initial values for chain 1 ; K3 Simulation JAGS @ 2 number of iterations= 38 number of iterations= 16 number of iterations= 14 number of iterations= 17 number of iterations= 27 number of iterations= 22 number of iterations= 27 number of iterations= 35 number of iterations= 36 number of iterations= 51 Calculating initial values for chain 2 ; K3 Simulation JAGS @ 2 number of iterations= 72 number of iterations= 21 number of iterations= 39 number of iterations= 17 number of iterations= 27 number of iterations= 19 number of iterations= 8 number of iterations= 12 number of iterations= 36 number of iterations= 74 Calculating initial values for chain 3 ; K3 Simulation JAGS @ 2 number of iterations= 25 number of iterations= 15 number of iterations= 110 number of iterations= 46 number of iterations= 36 number of iterations= 436 number of iterations= 15 number of iterations= 12 One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. Error in normalmixEM(subset, k = K) : Too many tries! One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. One of the variances is going to zero; trying new starting values. Error in normalmixEM(subset, k = K) : Too many tries! number of iterations= 23 number of iterations= 48 Loading Model for K3 Simulation JAGS @ 2 module mix loaded module dic loaded Compiling data graph Resolving undeclared variables Allocating nodes Initializing Reading data back into data table Compiling model graph Resolving undeclared variables Allocating nodes Graph Size: 747 Initializing model Burn in iterations for K3 Simulation JAGS @ 2 **************** Learning hyperparameters for K3 Simulation JAGS @ 2 Attempt 1 Labeling components for level 2 model K3 Simulation JAGS @ 2 Labeling components for alpha0 Labeling components for mu0 Labeling components for tau0 Labeling components for beta0 Labeling components for gamma0 **************** Convergence diagnostics for K3 Simulation JAGS @ 2 Run Number 1 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE 1293.4044 16.5361 0.1350 0.2109 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% 1261 1282 1296 1305 1322 Potential scale reduction factors: Point est. Upper C.I. deviance 2.29 3.94 deviance 2666.872 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE 8.50932 3.26378 0.02665 0.07172 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% 3.636 6.158 7.997 10.303 16.410 Potential scale reduction factors: Point est. Upper C.I. alphaN 1.01 1.02 alphaN 2135.401 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE alpha0[1] 0.6144 0.07678 0.0006269 0.003596 alpha0[2] 0.3856 0.07678 0.0006269 0.003596 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% alpha0[1] 0.4566 0.5633 0.6188 0.6672 0.7591 alpha0[2] 0.2409 0.3328 0.3812 0.4367 0.5434 Potential scale reduction factors: Point est. Upper C.I. [1,] 1.14 1.42 alpha0[1] alpha0[2] 648.6479 648.6479 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE mu0[1] -0.7144 0.1862 0.001520 0.04231 mu0[2] 0.2805 0.3394 0.002771 0.04149 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% mu0[1] -1.0239 -0.8359 -0.7474 -0.6104 -0.2669 mu0[2] -0.4433 0.0870 0.3191 0.4977 0.9066 Potential scale reduction factors: Point est. Upper C.I. mu0[1] 1.14 1.38 mu0[2] 1.84 3.39 Multivariate psrf 1.89 mu0[1] mu0[2] 32.94001 68.12421 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE tau0[1] 1.4869 0.6301 0.005145 0.05091 tau0[2] -0.0091 0.6077 0.004961 0.04453 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% tau0[1] 0.1659 1.0878 1.51465 1.9150 2.639 tau0[2] -1.1905 -0.4047 -0.01815 0.3832 1.181 Potential scale reduction factors: Point est. Upper C.I. tau0[1] 1.07 1.22 tau0[2] 1.02 1.07 Multivariate psrf 1.07 tau0[1] tau0[2] 155.6249 183.4752 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE beta0[1] 0.4570 0.2045 0.001670 0.01145 beta0[2] 0.5591 0.2722 0.002222 0.01842 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% beta0[1] 0.1897 0.3037 0.4042 0.5703 0.9667 beta0[2] 0.1863 0.3465 0.5039 0.7195 1.2344 Potential scale reduction factors: Point est. Upper C.I. beta0[1] 2.34 4.69 beta0[2] 1.87 3.19 Multivariate psrf 2.36 beta0[1] beta0[2] 166.7628 204.5697 Iterations = 1:5000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 5000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE gamma0[1] 2.102 0.5734 0.004682 0.03992 gamma0[2] 2.098 0.5505 0.004495 0.03167 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% gamma0[1] 1.268 1.680 1.996 2.424 3.447 gamma0[2] 1.324 1.723 1.995 2.355 3.424 Potential scale reduction factors: Point est. Upper C.I. gamma0[1] 1.09 1.27 gamma0[2] 1.03 1.09 Multivariate psrf 1.1 gamma0[1] gamma0[2] 212.4305 310.2324 Chains of length 5000 for K3 Simulation JAGS @ 2 did not converge in run 1 . Maximum Rhat value = 2.364729 . deviance [[ 1 ]] Mean SD Naive SE Time-series SE 1302.1011334 10.4774732 0.1481738 0.3301376 deviance [[ 2 ]] Mean SD Naive SE Time-series SE 1302.4012636 10.7617347 0.1521939 0.3893062 deviance [[ 3 ]] Mean SD Naive SE Time-series SE 1275.7109366 11.1854623 0.1581863 0.3737847 alphaN [[ 1 ]] Mean SD Naive SE Time-series SE 8.2685305 3.0892434 0.0436885 0.1050500 alphaN [[ 2 ]] Mean SD Naive SE Time-series SE 8.76461174 3.40515886 0.04815622 0.12938294 alphaN [[ 3 ]] Mean SD Naive SE Time-series SE 8.49481290 3.27094283 0.04625812 0.13605952 alpha0 [[ 1 ]] Mean SD Naive SE Time-series SE alpha0[1] 0.6508524 0.06863296 0.0009706166 0.003842623 alpha0[2] 0.3491476 0.06863296 0.0009706166 0.003842623 alpha0 [[ 2 ]] Mean SD Naive SE Time-series SE alpha0[1] 0.594086 0.071708 0.001014104 0.008922392 alpha0[2] 0.405914 0.071708 0.001014104 0.008922392 alpha0 [[ 3 ]] Mean SD Naive SE Time-series SE alpha0[1] 0.5982461 0.07636846 0.001080013 0.004690899 alpha0[2] 0.4017539 0.07636846 0.001080013 0.004690899 mu0 [[ 1 ]] Mean SD Naive SE Time-series SE mu0[1] -0.7629393 0.1071938 0.001515949 0.02416121 mu0[2] 0.5222579 0.2258764 0.003194374 0.04687004 mu0 [[ 2 ]] Mean SD Naive SE Time-series SE mu0[1] -0.7222101 0.1588461 0.002246423 0.05506532 mu0[2] 0.3335016 0.1737658 0.002457420 0.02914093 mu0 [[ 3 ]] Mean SD Naive SE Time-series SE mu0[1] -0.6579532 0.2483250 0.003511846 0.1117818 mu0[2] -0.0142161 0.3410463 0.004823123 0.1115774 tau0 [[ 1 ]] Mean SD Naive SE Time-series SE tau0[1] 1.29791368 0.5777282 0.008170310 0.08995137 tau0[2] -0.01359069 0.5789320 0.008187335 0.07178805 tau0 [[ 2 ]] Mean SD Naive SE Time-series SE tau0[1] 1.49028565 0.6390018 0.009036850 0.1005809 tau0[2] 0.08925825 0.5781706 0.008176567 0.0772293 tau0 [[ 3 ]] Mean SD Naive SE Time-series SE tau0[1] 1.6724847 0.6156870 0.008707129 0.07156629 tau0[2] -0.1029678 0.6480079 0.009164215 0.08203734 beta0 [[ 1 ]] Mean SD Naive SE Time-series SE beta0[1] 0.3219399 0.08810288 0.001245963 0.009574712 beta0[2] 0.4724379 0.21905093 0.003097848 0.024799933 beta0 [[ 2 ]] Mean SD Naive SE Time-series SE beta0[1] 0.3738202 0.1156900 0.001636103 0.01817449 beta0[2] 0.3923297 0.1485554 0.002100891 0.01464535 beta0 [[ 3 ]] Mean SD Naive SE Time-series SE beta0[1] 0.6752387 0.1775391 0.002510782 0.02753516 beta0[2] 0.8125687 0.2293681 0.003243755 0.04715312 gamma0 [[ 1 ]] Mean SD Naive SE Time-series SE gamma0[1] 2.091274 0.5387718 0.007619384 0.07135091 gamma0[2] 2.135221 0.5458191 0.007719047 0.05384927 gamma0 [[ 2 ]] Mean SD Naive SE Time-series SE gamma0[1] 2.290167 0.6165036 0.008718677 0.08208662 gamma0[2] 2.171126 0.6072192 0.008587377 0.06542548 gamma0 [[ 3 ]] Mean SD Naive SE Time-series SE gamma0[1] 1.923299 0.4986428 0.007051874 0.05011385 gamma0[2] 1.989000 0.4732239 0.006692397 0.04295750 **************** Learning hyperparameters for K3 Simulation JAGS @ 2 Attempt 2 Labeling components for level 2 model K3 Simulation JAGS @ 2 Labeling components for alpha0 Labeling components for mu0 Labeling components for tau0 Labeling components for beta0 Labeling components for gamma0 **************** Convergence diagnostics for K3 Simulation JAGS @ 2 Run Number 2 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE 1.293e+03 1.634e+01 7.701e-02 1.266e-01 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% 1261 1282 1295 1305 1322 Potential scale reduction factors: Point est. Upper C.I. deviance 2.23 3.83 deviance 7450.301 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE 8.51984 3.25080 0.01532 0.04118 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% 3.678 6.158 8.033 10.340 16.250 Potential scale reduction factors: Point est. Upper C.I. alphaN 1 1 alphaN 6236.507 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE alpha0[1] 0.6219 0.07495 0.0003533 0.002144 alpha0[2] 0.3781 0.07495 0.0003533 0.002144 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% alpha0[1] 0.4628 0.5740 0.6253 0.6725 0.7601 alpha0[2] 0.2399 0.3275 0.3747 0.4260 0.5372 Potential scale reduction factors: Point est. Upper C.I. [1,] 1.06 1.18 alpha0[1] alpha0[2] 1236.916 1236.916 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE mu0[1] -0.6796 0.1815 0.0008557 0.02169 mu0[2] 0.2898 0.3066 0.0014453 0.02235 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% mu0[1] -0.9933 -0.8016 -0.7043 -0.5808 -0.2398 mu0[2] -0.3874 0.1157 0.3199 0.4860 0.8452 Potential scale reduction factors: Point est. Upper C.I. mu0[1] 1.26 1.80 mu0[2] 1.56 2.54 Multivariate psrf 1.69 mu0[1] mu0[2] 101.1779 185.8789 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE tau0[1] 1.37895 0.6167 0.002907 0.03113 tau0[2] -0.02364 0.5934 0.002797 0.02496 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% tau0[1] 0.04468 0.9831 1.41521 1.8079 2.501 tau0[2] -1.14950 -0.4135 -0.03787 0.3533 1.166 Potential scale reduction factors: Point est. Upper C.I. tau0[1] 1.03 1.09 tau0[2] 1.01 1.03 Multivariate psrf 1.03 tau0[1] tau0[2] 387.7952 562.8538 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE beta0[1] 0.4558 0.1943 0.000916 0.006139 beta0[2] 0.5706 0.2844 0.001340 0.013285 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% beta0[1] 0.200 0.3058 0.4089 0.5695 0.9202 beta0[2] 0.198 0.3519 0.5040 0.7346 1.2859 Potential scale reduction factors: Point est. Upper C.I. beta0[1] 2.11 3.82 beta0[2] 1.74 2.85 Multivariate psrf 2.21 beta0[1] beta0[2] 497.4168 498.8080 Iterations = 1:15000 Thinning interval = 1 Number of chains = 3 Sample size per chain = 15000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE gamma0[1] 2.078 0.5567 0.002624 0.02276 gamma0[2] 2.092 0.5302 0.002499 0.01735 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% gamma0[1] 1.273 1.681 1.979 2.372 3.453 gamma0[2] 1.321 1.722 2.003 2.361 3.369 Potential scale reduction factors: Point est. Upper C.I. gamma0[1] 1.03 1.09 gamma0[2] 1.03 1.11 Multivariate psrf 1.06 gamma0[1] gamma0[2] 585.4028 905.6639 Chains of length 10000 for K3 Simulation JAGS @ 2 did not converge in run 2 . Maximum Rhat value = 2.233696 . deviance [[ 1 ]] Mean SD Naive SE Time-series SE 1.301822e+03 1.054812e+01 8.612507e-02 1.973920e-01 deviance [[ 2 ]] Mean SD Naive SE Time-series SE 1.301932e+03 1.071678e+01 8.750213e-02 2.230686e-01 deviance [[ 3 ]] Mean SD Naive SE Time-series SE 1.275973e+03 1.127611e+01 9.206905e-02 2.358081e-01 alphaN [[ 1 ]] Mean SD Naive SE Time-series SE 8.37722584 3.18800328 0.02602994 0.06990828 alphaN [[ 2 ]] Mean SD Naive SE Time-series SE 8.60512587 3.28623477 0.02683199 0.07020108 alphaN [[ 3 ]] Mean SD Naive SE Time-series SE 8.57717583 3.27274735 0.02672187 0.07381909 alpha0 [[ 1 ]] Mean SD Naive SE Time-series SE alpha0[1] 0.6402577 0.06971845 0.0005692488 0.003078697 alpha0[2] 0.3597423 0.06971845 0.0005692488 0.003078697 alpha0 [[ 2 ]] Mean SD Naive SE Time-series SE alpha0[1] 0.6247887 0.07135359 0.0005825996 0.004259468 alpha0[2] 0.3752113 0.07135359 0.0005825996 0.004259468 alpha0 [[ 3 ]] Mean SD Naive SE Time-series SE alpha0[1] 0.6005733 0.07811804 0.0006378311 0.003709497 alpha0[2] 0.3994267 0.07811804 0.0006378311 0.003709497 mu0 [[ 1 ]] Mean SD Naive SE Time-series SE mu0[1] -0.7423222 0.1228627 0.001003170 0.01756137 mu0[2] 0.4330820 0.2414135 0.001971133 0.03131624 mu0 [[ 2 ]] Mean SD Naive SE Time-series SE mu0[1] -0.7125625 0.1339262 0.001093503 0.02194441 mu0[2] 0.3897587 0.1839990 0.001502346 0.01890357 mu0 [[ 3 ]] Mean SD Naive SE Time-series SE mu0[1] -0.58382614 0.2272406 0.001855412 0.05870278 mu0[2] 0.04655272 0.3164917 0.002584144 0.05620387 tau0 [[ 1 ]] Mean SD Naive SE Time-series SE tau0[1] 1.27121295 0.5707318 0.004660006 0.04931584 tau0[2] 0.01000465 0.5766030 0.004707944 0.04084658 tau0 [[ 2 ]] Mean SD Naive SE Time-series SE tau0[1] 1.362571516 0.6182022 0.0050476 0.05877831 tau0[2] 0.009666351 0.5718089 0.0046688 0.04269323 tau0 [[ 3 ]] Mean SD Naive SE Time-series SE tau0[1] 1.5030626 0.6369207 0.005200436 0.05321683 tau0[2] -0.0905863 0.6246005 0.005099842 0.04602122 beta0 [[ 1 ]] Mean SD Naive SE Time-series SE beta0[1] 0.3501359 0.1086742 0.0008873211 0.007678027 beta0[2] 0.4666111 0.2167777 0.0017699826 0.014707211 beta0 [[ 2 ]] Mean SD Naive SE Time-series SE beta0[1] 0.3637316 0.1182741 0.0009657041 0.01028580 beta0[2] 0.4218815 0.1824509 0.0014897051 0.01208133 beta0 [[ 3 ]] Mean SD Naive SE Time-series SE beta0[1] 0.6534825 0.1695641 0.001384485 0.01320609 beta0[2] 0.8231683 0.2560855 0.002090930 0.03501561 gamma0 [[ 1 ]] Mean SD Naive SE Time-series SE gamma0[1] 2.100196 0.5264137 0.00429815 0.03712769 gamma0[2] 2.120539 0.5340438 0.00436045 0.02971044 gamma0 [[ 2 ]] Mean SD Naive SE Time-series SE gamma0[1] 2.169647 0.5735012 0.004682617 0.04175237 gamma0[2] 2.183450 0.5524179 0.004510474 0.03128775 gamma0 [[ 3 ]] Mean SD Naive SE Time-series SE gamma0[1] 1.963761 0.5494234 0.004486023 0.03927436 gamma0[2] 1.971894 0.4789579 0.003910675 0.02910380 MCMC run did not converge, proceeding anyway. Learning parameters for K3 Simulation JAGS @ 2 Labeling components for K3 Simulation JAGS @ 2 Labeling components for pi Labeling components for mu Labeling components for tau Calculating model fit indexes for K3 Simulation JAGS @ 2 lppd pWAIC1 WAIC1 pWAIC2 WAIC2 -612.8859 67.6904 1361.1527 67.6904 1361.1527 lppd lppd.bayes pDIC DIC pDICalt DICalt -646.7311 -775.6037 -257.7452 1035.7171 127.2309 1805.6692 Analaysis complete for K3 Simulation JAGS @ 2 > proc.time() user system elapsed 734.810 2.126 738.241