• using R Under development (unstable) (2012-02-06 r58287)
  • using platform: i686-pc-linux-gnu (32-bit)
  • using session charset: UTF-8
  • checking for file ‘BAYSTAR/DESCRIPTION’ ... OK
  • this is package ‘BAYSTAR’ version ‘0.2-3’
  • checking package namespace information ... OK
  • checking package dependencies ... OK
  • checking if this is a source package ... OK
  • checking if there is a namespace ... OK
  • checking for executable files ... OK
  • checking whether package ‘BAYSTAR’ can be installed ... OK
  • checking installed package size ... OK
  • checking package directory ... OK
  • checking for portable file names ... OK
  • checking for sufficient/correct file permissions ... OK
  • checking DESCRIPTION meta-information ... OK
  • checking top-level files ... OK
  • checking index information ... OK
  • checking package subdirectories ... OK
  • checking R files for non-ASCII characters ... OK
  • checking R files for syntax errors ... OK
  • checking whether the package can be loaded ... OK
  • checking whether the package can be loaded with stated dependencies ... OK
  • checking whether the package can be unloaded cleanly ... OK
  • checking whether the namespace can be loaded with stated dependencies ... OK
  • checking whether the namespace can be unloaded cleanly ... OK
  • checking for unstated dependencies in R code ... OK
  • checking S3 generic/method consistency ... OK
  • checking replacement functions ... OK
  • checking foreign function calls ... OK
  • checking R code for possible problems ... NOTE
    File ‘BAYSTAR/R/zzz.R’:
    .onAttach calls:
    cat("##\n## On Bayesian analysis of Threshold autoregressive model (BAYSTAR)\n")
    cat("## Copyright (C) 2007-", this.year, " Cathy W. S. Chen, Edward M.H. Lin, F.C. Liu, and Richard Gerlach\n", sep = "")
    require(mvtnorm, quietly = TRUE)

    Package startup functions should not change the search path.
    Package startup functions should use ‘packageStartupMessage’ to
    generate messages.
    See section ‘Good practice’ in ?.onAttach.
  • checking Rd files ... OK
  • checking Rd metadata ... OK
  • checking Rd cross-references ... OK
  • checking for missing documentation entries ... OK
  • checking for code/documentation mismatches ... OK
  • checking Rd \usage sections ... OK
  • checking Rd contents ... OK
  • checking for unstated dependencies in examples ... WARNING
    ‘library’ or ‘require’ call not declared from: ‘coda’
  • checking contents of ‘data’ directory ... OK
  • checking data for non-ASCII characters ... OK
  • checking data for ASCII and uncompressed saves ... OK
  • checking examples ... ERROR
    Running examples in ‘BAYSTAR-Ex.R’ failed
    The error most likely occurred in:

    > ### Name: BAYSTAR
    > ### Title: Threshold Autoregressive model: Bayesian approach
    > ### Aliases: BAYSTAR
    > ### Keywords: methods
    >
    > ### ** Examples
    >
    > library(BAYSTAR)
    > data(unemployrate)
    > x<- unemployrate
    > nx<- length(x)
    > differ.x<- x[2:nx]-x[2:nx-1]
    > lagp1<- c(2,3,4,10,12)
    > lagp2<- c(2,3,12)
    >
    > ## Total MCMC iterations and burn-in iterations
    > Iteration<- 10000
    > Burnin<- 2000
    >
    > ## A RW (random walk) MH algorithm is used in simulating the threshold value
    > ## Step size for the RW MH
    >
    > step.thv<- 2.5
    >
    > out1 <- BAYSTAR(differ.x,lagp1,lagp2,Iteration,Burnin,constant=0,step.thv=step.thv)
    iteration = 1000
    regime 1 = 0.0836 0.0906 0.1757 -0.1047 -0.1427
    regime 2 = 0.3012 0.2049 -0.1992
    sigma^2 1 = 0.0279
    sigma^2 2 = 0.0581
    r = 0.0507
    acceptance rate of r = 50.7 %
    Lag choice :
    1 2 3
    Freq 14 0 986
    ------------
    iteration = 2000
    regime 1 = 0.2269 0.0869 0.1311 -0.0776 -0.1058
    regime 2 = 0.3371 0.2514 -0.136
    sigma^2 1 = 0.0313
    sigma^2 2 = 0.0573
    r = 0.0966
    acceptance rate of r = 50.1 %
    Lag choice :
    1 2 3
    Freq 17 0 1983
    ------------
    iteration = 3000
    regime 1 = 0.2219 0.1828 0.0472 -0.0883 -0.0475
    regime 2 = 0.3133 0.3792 -0.2293
    sigma^2 1 = 0.0295
    sigma^2 2 = 0.0547
    r = 0.0881
    acceptance rate of r = 50.5 %
    Lag choice :
    1 2 3
    Freq 35 0 2965
    ------------
    iteration = 4000
    regime 1 = 0.1797 0.1535 0.0917 -0.0388 -0.1164
    regime 2 = 0.3911 0.2791 -0.1511
    sigma^2 1 = 0.031
    sigma^2 2 = 0.0554
    r = 0.0659
    acceptance rate of r = 50.325 %
    Lag choice :
    1 2 3
    Freq 65 0 3935
    ------------
    iteration = 5000
    regime 1 = 0.1622 0.2348 0.097 -0.1425 -0.0328
    regime 2 = 0.3334 0.321 -0.172
    sigma^2 1 = 0.0335
    sigma^2 2 = 0.0625
    r = 0.0078
    acceptance rate of r = 50.48 %
    Lag choice :
    1 2 3
    Freq 72 0 4928
    ------------
    iteration = 6000
    regime 1 = 0.1389 0.15 0.1488 -0.1587 -0.0729
    regime 2 = 0.2782 0.1685 -0.2313
    sigma^2 1 = 0.0301
    sigma^2 2 = 0.0632
    r = 0.0331
    acceptance rate of r = 50.2167 %
    Lag choice :
    1 2 3
    Freq 72 0 5928
    ------------
    iteration = 7000
    regime 1 = 0.1625 0.1791 0.1577 -0.123 -0.0998
    regime 2 = 0.2062 0.2487 -0.3244
    sigma^2 1 = 0.0292
    sigma^2 2 = 0.0533
    r = 0.0928
    acceptance rate of r = 50.0143 %
    Lag choice :
    1 2 3
    Freq 88 0 6912
    ------------
    iteration = 8000
    regime 1 = 0.1907 0.163 0.1742 -0.0726 -0.1231
    regime 2 = 0.36 0.2576 -0.266
    sigma^2 1 = 0.0303
    sigma^2 2 = 0.0594
    r = 3e-04
    acceptance rate of r = 50.3 %
    Lag choice :
    1 2 3
    Freq 89 0 7911
    ------------
    iteration = 9000
    regime 1 = 0.1789 0.1762 0.1692 -0.0916 -0.1276
    regime 2 = 0.2456 0.2017 -0.2488
    sigma^2 1 = 0.0255
    sigma^2 2 = 0.0523
    r = 0.0466
    acceptance rate of r = 50.1222 %
    Lag choice :
    1 2 3
    Freq 89 0 8911
    ------------
    iteration = 10000
    regime 1 = 0.1641 0.0905 0.1417 -0.1062 -0.1168
    regime 2 = 0.327 0.1981 -0.1867
    sigma^2 1 = 0.0326
    sigma^2 2 = 0.0696
    r = 0.0233
    acceptance rate of r = 50.24 %
    Lag choice :
    1 2 3
    Freq 96 0 9904
    ------------
    mean median s.d. lower upper
    phi1.2 0.1866 0.1867 0.0459 0.0956 0.2749
    phi1.3 0.1432 0.1436 0.0469 0.0504 0.2354
    phi1.4 0.1262 0.1264 0.0438 0.0406 0.2118
    phi1.10 -0.1051 -0.1052 0.0402 -0.1825 -0.0269
    phi1.12 -0.0876 -0.0874 0.0403 -0.1673 -0.0107
    phi2.2 0.3134 0.3135 0.0624 0.1940 0.4399
    phi2.3 0.2224 0.2228 0.0585 0.1084 0.3398
    phi2.12 -0.2356 -0.2352 0.0776 -0.3861 -0.0800
    sigma^2 1 0.0300 0.0298 0.0021 0.0262 0.0343
    simga^2 2 0.0587 0.0584 0.0055 0.0489 0.0706
    r 0.0505 0.0504 0.0287 0.0029 0.0979
    Lag choice :
    1 2 3
    Freq 96 0 9904
    ------------
    The highest posterior prob. of lag is at : 3
    DIC = -1485.77
    dev.new(): using pdf(file="Rplots1.pdf")
    dev.new(): using pdf(file="Rplots2.pdf")
    >
    >
    > d0 <- 4
    > out2 <- BAYSTAR(differ.x,lagp1,lagp2,Iteration,Burnin,d0,constant=0,step.thv=step.thv)
    iteration = 1000
    regime 1 = 0.1775 0.1487 0.119 -0.0899 -0.1379
    regime 2 = 0.3745 0.2024 -0.2968
    sigma^2 1 = 0.0274
    sigma^2 2 = 0.0613
    r = 0.0753
    acceptance rate of r = 49.9 %
    Lag choice :
    1 2 3 4
    Freq 0 0 1 999
    ------------
    iteration = 2000
    regime 1 = 0.0894 0.129 0.1561 -0.002 -0.1634
    regime 2 = 0.4669 0.1484 -0.3012
    sigma^2 1 = 0.029
    sigma^2 2 = 0.0783
    r = 0.0963
    acceptance rate of r = 50.4 %
    Lag choice :
    1 2 3 4
    Freq 0 0 1 1999
    ------------
    iteration = 3000
    regime 1 = 0.1336 0.1028 0.2214 -0.0855 -0.0905
    regime 2 = 0.3383 0.1121 -0.074
    sigma^2 1 = 0.0268
    sigma^2 2 = 0.0682
    r = 0.0206
    acceptance rate of r = 50.2333 %
    Lag choice :
    1 2 3 4
    Freq 0 0 1 2999
    ------------
    iteration = 4000
    regime 1 = 0.0724 0.1379 0.2 -0.0613 -0.1505
    regime 2 = 0.2513 0.1924 -0.3819
    sigma^2 1 = 0.0235
    sigma^2 2 = 0.0541
    r = 0.0722
    acceptance rate of r = 50.725 %
    Lag choice :
    1 2 3 4
    Freq 0 0 1 3999
    ------------
    iteration = 5000
    regime 1 = 0.0447 0.1576 0.1742 -0.0224 -0.1683
    regime 2 = 0.2795 0.2052 -0.2188
    sigma^2 1 = 0.0253
    sigma^2 2 = 0.0658
    r = 0.0091
    acceptance rate of r = 50.52 %
    Lag choice :
    1 2 3 4
    Freq 0 0 1 4999
    ------------
    iteration = 6000
    regime 1 = 0.0751 0.1707 0.1621 -0.0293 -0.1781
    regime 2 = 0.2943 0.1843 -0.2527
    sigma^2 1 = 0.0266
    sigma^2 2 = 0.0709
    r = 0.075
    acceptance rate of r = 50.15 %
    Lag choice :
    1 2 3 4
    Freq 0 0 1 5999
    ------------
    iteration = 7000
    regime 1 = 0.0441 0.0806 0.2063 -0.0507 -0.142
    regime 2 = 0.3002 0.2118 -0.1013
    sigma^2 1 = 0.0299
    sigma^2 2 = 0.0687
    r = 0.0722
    acceptance rate of r = 50.1429 %
    Lag choice :
    1 2 3 4
    Freq 0 0 2 6998
    ------------
    iteration = 8000
    regime 1 = 0.0813 0.2005 0.1082 -0.0114 -0.1856
    regime 2 = 0.4721 0.2235 -0.2174
    sigma^2 1 = 0.0274
    sigma^2 2 = 0.0656
    r = 0.0304
    acceptance rate of r = 50.25 %
    Lag choice :
    1 2 3 4
    Freq 0 0 2 7998
    ------------
    iteration = 9000
    regime 1 = 0.1558 0.1484 0.2083 -0.0678 -0.1628
    regime 2 = 0.3061 0.1692 -0.1441
    sigma^2 1 = 0.0306
    sigma^2 2 = 0.0616
    r = 0.0348
    acceptance rate of r = 50.2778 %
    Lag choice :
    1 2 3 4
    Freq 0 0 2 8998
    ------------
    iteration = 10000
    regime 1 = 0.1944 0.1667 0.1326 -0.1317 -0.1186
    regime 2 = 0.2903 0.1524 -0.1023
    sigma^2 1 = 0.0266
    sigma^2 2 = 0.0567
    r = 0.0201
    acceptance rate of r = 50.19 %
    Lag choice :
    1 2 3 4
    Freq 0 0 2 9998
    ------------
    mean median s.d. lower upper
    phi1.2 0.1184 0.1181 0.0441 0.0314 0.2045
    phi1.3 0.1445 0.1445 0.0416 0.0621 0.2257
    phi1.4 0.1590 0.1587 0.0449 0.0699 0.2457
    phi1.10 -0.0744 -0.0740 0.0360 -0.1459 -0.0057
    phi1.12 -0.1312 -0.1310 0.0372 -0.2063 -0.0579
    phi2.2 0.3623 0.3621 0.0664 0.2334 0.4922
    phi2.3 0.1775 0.1770 0.0656 0.0509 0.3061
    phi2.12 -0.1700 -0.1707 0.0812 -0.3265 -0.0111
    sigma^2 1 0.0273 0.0272 0.0019 0.0238 0.0313
    simga^2 2 0.0626 0.0623 0.0057 0.0524 0.0747
    r 0.0493 0.0486 0.0287 0.0023 0.0971
    Lag choice :
    1 2 3 4
    Freq 0 0 2 9998
    ------------
    The highest posterior prob. of lag is at : 4
    DIC = -1508.73
    dev.new(): using pdf(file="Rplots3.pdf")
    dev.new(): using pdf(file="Rplots4.pdf")
    dev.new(): using pdf(file="Rplots5.pdf")
    >
    > ## Comparison with DIC
    >
    > library(coda)
    Error in library(coda) : there is no package called ‘coda’
    Execution halted