Package check result: ERROR Check: examples, Result: ERROR Running examples in ‘BayesSIM-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: genBasic > ### Title: Extract Residuals from 'BayesSIM' > ### Aliases: genBasic residuals.bsim > > ### ** Examples > > ## No test: > simdata2 <- data.frame(DATA1$X, y = DATA1$y) > > # 1. One tool version > fit_one <- BayesSIM(y ~ ., data = simdata2, + niter = 5000, nburnin = 1000, nchain = 1) Build Model Assign samplers Compile Model Compile MCMC Run MCMC running chain 1... |-------------|-------------|-------------|-------------| |-------------------------------------------------------| > > # Check median index vector estimates with standard errors > coef(fit_one, method = "median", se = TRUE) X1 X2 X3 X4 est 0.785851775 0.332541482 0.348659468 0.385598176 Std.error 0.003429263 0.007480978 0.007468278 0.006091749 > > # Fitted index values of median prediction > fitted(fit_one, type = "linpred", method = "median") [1] -0.371574677 0.653315000 -0.003440872 0.525033982 0.302704249 [6] -0.265257833 -0.175341284 0.432024368 -0.380692139 -0.258254693 [11] 0.677993792 -0.317339681 -0.478744546 0.609304922 -1.018145817 [16] 0.765135630 0.119681535 -0.708450657 0.297581240 0.311737732 [21] 0.811589797 0.992342609 0.652533807 0.681200921 -0.133221000 [26] 0.241767327 -0.258315601 0.380036299 -0.542284997 -0.174503151 [31] 1.323113218 0.895119803 0.175926774 0.693279156 -1.397675862 [36] -0.240946923 0.279720120 -0.040505829 -0.551923556 -0.518725293 [41] -0.609650527 0.262684945 0.107541378 -0.439186695 -0.732085214 [46] -0.175379434 -0.114967387 -0.306946758 -0.309630615 0.923413796 [51] -0.663869026 -0.059780709 0.331564306 -1.006727617 0.114873411 [56] 0.278143504 -0.272614549 0.164983110 0.362805704 -0.328582603 [61] 1.141800979 -0.192186560 -0.386352547 -0.123312468 0.360925219 [66] -0.518141000 0.524974622 0.258118679 0.105315434 -0.127230983 [71] -0.006233083 0.114401466 -0.323442651 -0.997727502 0.193216917 [76] -0.255420432 0.450371081 -0.425107255 -0.745267978 -0.408272134 [81] -0.249445063 0.406559937 -0.077201598 0.699023464 -0.267769837 [86] -0.401084330 0.228040677 0.306596826 0.245287540 -0.352730711 [91] -0.741827287 -0.221629816 -0.529428811 0.363792137 -0.567080197 [96] 0.128957578 0.334220147 -1.529808505 -0.245265768 0.306458272 [101] 0.510624469 -0.867335948 -0.348536600 0.854213991 -0.161869423 [106] 0.477300968 0.483486336 -0.247976148 -0.103679984 -0.725827682 [111] 0.686799515 -0.611448162 -0.172879960 0.512454288 0.404079944 [116] -0.678538287 -0.109966748 0.344646330 0.112547058 0.006701205 [121] 0.267195515 -0.345843294 -0.482283470 -0.341236162 -0.372832091 [126] 0.773638034 0.337821807 -1.198565869 -0.102388637 0.069289909 [131] 0.507961350 0.892737215 0.507665309 1.144189327 -0.665625886 [136] 0.271303314 0.766481407 1.151898999 0.738026742 -0.318662269 [141] 0.238156242 -0.953104251 -0.867478420 -0.761418081 0.568242860 [146] -0.163286775 -0.151945792 -0.825829457 -0.218829075 0.712528708 [151] 0.012468394 -0.091741889 -0.380223676 -0.682761687 -0.465242406 [156] 0.203722887 0.336929740 -0.178681271 -0.554909438 -0.785410194 [161] -0.539550298 -0.338379825 0.746379314 -0.547832089 -0.159621066 [166] 0.075667252 -0.172281543 -0.611261824 -0.025307472 0.008620689 [171] 0.510377360 -0.076168134 1.013014665 0.540956305 0.314557565 [176] 0.449113999 -0.207926912 -0.556179537 0.612832896 0.673371964 [181] 0.669706890 0.344771989 0.115789597 -0.163472585 0.675541026 [186] -0.026113657 -0.960082282 -0.298935505 0.545406207 0.816410680 [191] 0.314306283 -0.690680334 1.025724845 0.106592663 0.369046020 [196] -0.032405228 -0.599602513 -0.297703716 -0.633424370 -0.069958437 > > # Residuals of median prediction > residuals(fit_one, method = "median") [1] -0.108616338 -0.458088766 -0.427240619 -0.053077977 0.269002830 [6] -0.784059644 -0.151749637 0.096163308 -0.362979610 0.139875020 [11] 0.272576016 0.276259738 0.151638243 0.049196863 -0.237340015 [16] -1.144950263 0.103086245 0.212637119 0.253000524 -0.272149280 [21] 0.936031766 0.287657025 0.232760939 0.736936471 -0.192486151 [26] -0.311172043 1.221235815 -0.038150867 0.640985914 -0.714841798 [31] 0.244809421 0.066375002 0.175527891 -0.413696496 0.269511742 [36] -0.696862824 0.224931562 0.345653838 -1.255073509 0.433969213 [41] -0.768099238 0.158182006 0.471700307 -0.306961905 -0.303185657 [46] 0.089676395 0.264119810 0.604950384 -0.871581063 -0.756724037 [51] 0.638300882 0.322045608 0.290950374 0.323840900 0.608212135 [56] -1.352792091 0.684268731 -0.171324240 0.121837483 -0.052020514 [61] 0.841939676 -0.347330593 0.121399998 -0.068641157 -0.483120022 [66] 0.432933328 0.261446043 0.756988039 0.170871783 0.712265736 [71] 0.864711974 0.001171978 -0.511908556 -0.168585422 -0.083676226 [76] 0.052772816 0.773249624 -0.337687484 0.251137927 -0.308391482 [81] -0.065661261 -0.002162043 0.478632910 0.147286482 0.443227957 [86] 0.247392368 0.336836204 -0.339549780 0.684547153 -0.213785104 [91] -0.029245965 0.453059414 0.490355943 -0.426097179 -0.604263202 [96] -0.512709712 0.207737673 0.591777107 0.074706744 0.296813796 [101] -0.338649247 -0.469803420 0.523182269 0.359027520 -0.581435056 [106] -0.277977092 -0.682519772 -1.093963975 0.007331671 -0.020232357 [111] -0.002410840 -0.025417000 0.463105418 -0.087912357 -0.439089167 [116] -0.427611540 -0.063521727 0.222890954 -0.383155425 -0.177020551 [121] 0.400906182 -0.004876475 -0.520590409 -0.077838021 0.492949686 [126] 0.300264164 0.808336710 0.105869532 0.140130414 -0.184567723 [131] 0.299674655 -0.402135782 -0.767670227 0.193938143 0.920704621 [136] 0.310282936 0.814860063 0.071094999 -0.063046057 0.023454455 [141] -0.190967647 -0.252421228 0.333050631 -0.539020853 0.499503774 [146] 0.568292078 -0.398648970 0.342975959 0.932395106 -0.089416916 [151] 0.351721168 -0.518976700 0.443438820 0.080438607 0.602331113 [156] -0.719349926 0.097622765 -0.281297522 -0.263282084 -0.267904404 [161] -0.557702451 0.356458214 -0.060556251 0.587757963 -0.413103083 [166] 0.160227843 0.322900382 0.153971044 -0.309063524 -0.037579677 [171] 0.386155836 -0.917058805 -0.436477741 0.136332259 -0.187437680 [176] 0.597933892 0.049419968 -0.104727864 -0.753991296 0.287919443 [181] 0.034674803 0.099906491 -0.438186542 0.397515476 -0.306646103 [186] -0.286185072 0.163631137 -0.195818622 0.260723492 -0.648872845 [191] -1.320810125 0.218962862 0.448993591 0.010385570 0.169386489 [196] -0.743528500 -0.205113474 -0.750860565 0.463858177 0.722946231 > > # Summary of the model > summary(fit_one) Summary statistics of all chains mean median Standard.error LB.2.5% UB.97.5% ess index_X1 0.786 0.786 0.00404 0.778 0.795 88.0 index_X2 0.333 0.333 0.00695 0.319 0.345 72.4 index_X3 0.349 0.349 0.00687 0.334 0.361 52.2 index_X4 0.386 0.386 0.00678 0.374 0.401 57.4 sigma2 1.377 1.366 0.14820 1.114 1.692 2981.0 > > # Convergence diagnostics > nimTraceplot(fit_one) > > # Goodness of fit > GOF(fit_one) [1] 0.2176051 > > # Fitted plot > plot(fit_one) Compile function.. Execution halted