R Under development (unstable) (2023-07-02 r84627 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## tests > #devtools::install_github("datacloning/dcmle") > > library(dcmle) Loading required package: dclone Loading required package: coda Loading required package: parallel Loading required package: Matrix dclone 2.3-2 2023-07-02 dcmle 0.4-0 2023-07-03 Attaching package: 'dcmle' The following objects are masked from 'package:coda': chanames, crosscorr.plot, cumuplot, gelman.diag, gelman.plot, geweke.diag, heidel.diag, raftery.diag, varnames > > ## data type classes > > as(new("gsFit"), "dcFit") Formal class 'dcFit' [package "dcmle"] with 10 slots ..@ multiply : NULL ..@ unchanged: NULL ..@ update : NULL ..@ updatefun: NULL ..@ initsfun : NULL ..@ data : list() ..@ model : chr(0) ..@ params : NULL ..@ inits : NULL ..@ flavour : chr "jags" > as(new("dcFit"), "gsFit") Formal class 'gsFit' [package "dcmle"] with 5 slots ..@ data : list() ..@ model : chr(0) ..@ params : NULL ..@ inits : NULL ..@ flavour: chr "jags" > > ## dcmle model fit classes > > str(as.mcmc.list(regmod)) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 - attr(*, "class")= chr "mcmc.list" > str(as(regmod, "mcmc.list")) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 - attr(*, "class")= chr "mcmc.list" > str(as(regmod, "MCMClist")) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 - attr(*, "class")= chr "mcmc.list" > str(as(regmod, "codaMCMC")) Formal class 'codaMCMC' [package "dcmle"] with 8 slots ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(regmod, "dcCodaMCMC")) Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots ..@ dctable :List of 3 .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..- attr(*, "class")= chr "dctable" ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. ..$ n.clones : num 1 .. ..$ lambda.max: num 0.0302 .. ..$ ms.error : num 0.102 .. ..$ r.squared : num 0.0109 .. ..$ r.hat : num 1 ..@ nclones : NULL ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(regmod, "dcmle")) Formal class 'dcmle' [package "dcmle"] with 7 slots ..@ call : symbol ..@ coef : Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ fullcoef: Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ vcov : num [1:3, 1:3] 2.31e-03 4.13e-05 -1.49e-05 4.13e-05 3.02e-02 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..@ details :Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots .. .. ..@ dctable :List of 3 .. .. .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. .. .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. .. .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. .. .. ..- attr(*, "class")= chr "dctable" .. .. ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. .. .. ..$ n.clones : num 1 .. .. .. ..$ lambda.max: num 0.0302 .. .. .. ..$ ms.error : num 0.102 .. .. .. ..$ r.squared : num 0.0109 .. .. .. ..$ r.hat : num 1 .. .. ..@ nclones : NULL .. .. ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... .. .. ..@ varnames: chr [1:3] "alpha" "beta" "sigma" .. .. ..@ start : int 1001 .. .. ..@ end : int 6000 .. .. ..@ thin : int 1 .. .. ..@ nchains : int 3 .. .. ..@ niter : int 5000 .. .. ..@ nvar : int 3 ..@ nobs : int NA ..@ method : chr "DataCloningMCMC" > > str(as(as(regmod, "MCMClist"), "MCMClist")) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 - attr(*, "class")= chr "mcmc.list" > str(as(as(regmod, "MCMClist"), "codaMCMC")) Formal class 'codaMCMC' [package "dcmle"] with 8 slots ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "MCMClist"), "dcCodaMCMC")) Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots ..@ dctable :List of 3 .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..- attr(*, "class")= chr "dctable" ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. ..$ n.clones : num 1 .. ..$ lambda.max: num 0.0302 .. ..$ ms.error : num 0.102 .. ..$ r.squared : num 0.0109 .. ..$ r.hat : num 1 ..@ nclones : NULL ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "MCMClist"), "dcmle")) Formal class 'dcmle' [package "dcmle"] with 7 slots ..@ call : symbol ..@ coef : Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ fullcoef: Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ vcov : num [1:3, 1:3] 2.31e-03 4.13e-05 -1.49e-05 4.13e-05 3.02e-02 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..@ details :Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots .. .. ..@ dctable :List of 3 .. .. .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. .. .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. .. .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. .. .. ..- attr(*, "class")= chr "dctable" .. .. ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. .. .. ..$ n.clones : num 1 .. .. .. ..$ lambda.max: num 0.0302 .. .. .. ..$ ms.error : num 0.102 .. .. .. ..$ r.squared : num 0.0109 .. .. .. ..$ r.hat : num 1 .. .. ..@ nclones : NULL .. .. ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... .. .. ..@ varnames: chr [1:3] "alpha" "beta" "sigma" .. .. ..@ start : int 1001 .. .. ..@ end : int 6000 .. .. ..@ thin : int 1 .. .. ..@ nchains : int 3 .. .. ..@ niter : int 5000 .. .. ..@ nvar : int 3 ..@ nobs : int NA ..@ method : chr "DataCloningMCMC" > > str(as(as(regmod, "codaMCMC"), "MCMClist")) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" - attr(*, "class")= chr "mcmc.list" > str(as(as(regmod, "codaMCMC"), "codaMCMC")) Formal class 'codaMCMC' [package "dcmle"] with 8 slots ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "codaMCMC"), "dcCodaMCMC")) Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots ..@ dctable : NULL ..@ dcdiag : NULL ..@ nclones : NULL ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "codaMCMC"), "dcmle")) Formal class 'dcmle' [package "dcmle"] with 7 slots ..@ call : symbol ..@ coef : Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ fullcoef: Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ vcov : num [1:3, 1:3] 2.31e-03 4.13e-05 -1.49e-05 4.13e-05 3.02e-02 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..@ details :Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots .. .. ..@ dctable : NULL .. .. ..@ dcdiag : NULL .. .. ..@ nclones : NULL .. .. ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... .. .. ..@ varnames: chr [1:3] "alpha" "beta" "sigma" .. .. ..@ start : int 1001 .. .. ..@ end : int 6000 .. .. ..@ thin : int 1 .. .. ..@ nchains : int 3 .. .. ..@ niter : int 5000 .. .. ..@ nvar : int 3 ..@ nobs : int NA ..@ method : chr "DataCloningMCMC" > > str(as(as(regmod, "dcCodaMCMC"), "MCMClist")) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" - attr(*, "class")= chr "mcmc.list" - attr(*, "dcdiag")=Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: ..$ n.clones : num 1 ..$ lambda.max: num 0.0302 ..$ ms.error : num 0.102 ..$ r.squared : num 0.0109 ..$ r.hat : num 1 - attr(*, "dctable")=List of 3 ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ n.clones: num 1 .. ..$ mean : num 0.601 .. ..$ sd : num 0.0481 .. ..$ 2.5% : num 0.507 .. ..$ 25% : num 0.569 .. ..$ 50% : num 0.602 .. ..$ 75% : num 0.634 .. ..$ 97.5% : num 0.695 .. ..$ r.hat : num 1 ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ n.clones: num 1 .. ..$ mean : num -1.02 .. ..$ sd : num 0.174 .. ..$ 2.5% : num -1.36 .. ..$ 25% : num -1.14 .. ..$ 50% : num -1.02 .. ..$ 75% : num -0.906 .. ..$ 97.5% : num -0.676 .. ..$ r.hat : num 1 ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..$ n.clones: num 1 .. ..$ mean : num 0.481 .. ..$ sd : num 0.0349 .. ..$ 2.5% : num 0.418 .. ..$ 25% : num 0.457 .. ..$ 50% : num 0.479 .. ..$ 75% : num 0.503 .. ..$ 97.5% : num 0.555 .. ..$ r.hat : num 1 ..- attr(*, "class")= chr "dctable" > str(as(as(regmod, "dcCodaMCMC"), "codaMCMC")) Formal class 'codaMCMC' [package "dcmle"] with 8 slots ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "dcCodaMCMC"), "dcCodaMCMC")) Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots ..@ dctable :List of 3 .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..- attr(*, "class")= chr "dctable" ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. ..$ n.clones : num 1 .. ..$ lambda.max: num 0.0302 .. ..$ ms.error : num 0.102 .. ..$ r.squared : num 0.0109 .. ..$ r.hat : num 1 ..@ nclones : NULL ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "dcCodaMCMC"), "dcmle")) Formal class 'dcmle' [package "dcmle"] with 7 slots ..@ call : symbol ..@ coef : Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ fullcoef: Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ vcov : num [1:3, 1:3] 2.31e-03 4.13e-05 -1.49e-05 4.13e-05 3.02e-02 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..@ details :Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots .. .. ..@ dctable :List of 3 .. .. .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. .. .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. .. .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. .. .. ..- attr(*, "class")= chr "dctable" .. .. ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. .. .. ..$ n.clones : num 1 .. .. .. ..$ lambda.max: num 0.0302 .. .. .. ..$ ms.error : num 0.102 .. .. .. ..$ r.squared : num 0.0109 .. .. .. ..$ r.hat : num 1 .. .. ..@ nclones : NULL .. .. ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... .. .. ..@ varnames: chr [1:3] "alpha" "beta" "sigma" .. .. ..@ start : int 1001 .. .. ..@ end : int 6000 .. .. ..@ thin : int 1 .. .. ..@ nchains : int 3 .. .. ..@ niter : int 5000 .. .. ..@ nvar : int 3 ..@ nobs : int NA ..@ method : chr "DataCloningMCMC" > > str(as(as(regmod, "dcmle"), "MCMClist")) List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" - attr(*, "class")= chr "mcmc.list" - attr(*, "dcdiag")=Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: ..$ n.clones : num 1 ..$ lambda.max: num 0.0302 ..$ ms.error : num 0.102 ..$ r.squared : num 0.0109 ..$ r.hat : num 1 - attr(*, "dctable")=List of 3 ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ n.clones: num 1 .. ..$ mean : num 0.601 .. ..$ sd : num 0.0481 .. ..$ 2.5% : num 0.507 .. ..$ 25% : num 0.569 .. ..$ 50% : num 0.602 .. ..$ 75% : num 0.634 .. ..$ 97.5% : num 0.695 .. ..$ r.hat : num 1 ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ n.clones: num 1 .. ..$ mean : num -1.02 .. ..$ sd : num 0.174 .. ..$ 2.5% : num -1.36 .. ..$ 25% : num -1.14 .. ..$ 50% : num -1.02 .. ..$ 75% : num -0.906 .. ..$ 97.5% : num -0.676 .. ..$ r.hat : num 1 ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..$ n.clones: num 1 .. ..$ mean : num 0.481 .. ..$ sd : num 0.0349 .. ..$ 2.5% : num 0.418 .. ..$ 25% : num 0.457 .. ..$ 50% : num 0.479 .. ..$ 75% : num 0.503 .. ..$ 97.5% : num 0.555 .. ..$ r.hat : num 1 ..- attr(*, "class")= chr "dctable" > str(as(as(regmod, "dcmle"), "codaMCMC")) Formal class 'codaMCMC' [package "dcmle"] with 8 slots ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "dcmle"), "dcCodaMCMC")) Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots ..@ dctable :List of 3 .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..- attr(*, "class")= chr "dctable" ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. ..$ n.clones : num 1 .. ..$ lambda.max: num 0.0302 .. ..$ ms.error : num 0.102 .. ..$ r.squared : num 0.0109 .. ..$ r.hat : num 1 ..@ nclones : NULL ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 > str(as(as(regmod, "dcmle"), "dcmle")) Formal class 'dcmle' [package "dcmle"] with 7 slots ..@ call : symbol ..@ coef : Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ fullcoef: Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ vcov : num [1:3, 1:3] 2.31e-03 4.13e-05 -1.49e-05 4.13e-05 3.02e-02 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..@ details :Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots .. .. ..@ dctable :List of 3 .. .. .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. .. .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. .. .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. .. .. ..- attr(*, "class")= chr "dctable" .. .. ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. .. .. ..$ n.clones : num 1 .. .. .. ..$ lambda.max: num 0.0302 .. .. .. ..$ ms.error : num 0.102 .. .. .. ..$ r.squared : num 0.0109 .. .. .. ..$ r.hat : num 1 .. .. ..@ nclones : NULL .. .. ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... .. .. ..@ varnames: chr [1:3] "alpha" "beta" "sigma" .. .. ..@ start : int 1001 .. .. ..@ end : int 6000 .. .. ..@ thin : int 1 .. .. ..@ nchains : int 3 .. .. ..@ niter : int 5000 .. .. ..@ nvar : int 3 ..@ nobs : int NA ..@ method : chr "DataCloningMCMC" > > ## testing methods > > regmod_MCMClist <- as(regmod, "MCMClist") > regmod_codaMCMC <- as(regmod, "codaMCMC") > regmod_dcCodaMCMC <- as(regmod, "dcCodaMCMC") > regmod_dcmle <- as(regmod, "dcmle") > > evalfun <- function(FUN) { + evalfun_int <- function(x, FUN) { + eval(parse(text= + paste(FUN, "(", x, ")", sep="") + )) + } + out <- rep(0L, 4) + names(out) <- c("MCMClist", "codaMCMC", "dcCodaMCMC", "dcmle") + + cat("\n\n***", FUN, "***") + + cat("\n\n---", FUN, "--- MCMClist ---\n") + ooo <- try(evalfun_int("regmod_MCMClist", FUN), silent=TRUE) + if (inherits(ooo, "try-error")) { + cat(as.character(ooo), "\n\n") + out[1] <- 1L + } else { + cat("OK\n\n") + } + + cat("\n\n---", FUN, "--- codaMCMC ---\n") + ooo <- try(evalfun_int("regmod_codaMCMC", FUN), silent=TRUE) + if (inherits(ooo, "try-error")) { + cat(as.character(ooo), "\n\n") + out[2] <- 1L + } else { + cat("OK\n\n") + } + + cat("\n\n---", FUN, "--- dcCodaMCMC ---\n") + ooo <- try(evalfun_int("regmod_dcCodaMCMC", FUN), silent=TRUE) + if (inherits(ooo, "try-error")) { + cat(as.character(ooo), "\n\n") + out[3] <- 1L + } else { + cat("OK\n\n") + } + + cat("\n\n---", FUN, "--- dcmle ---\n") + ooo <- try(evalfun_int("regmod_dcmle", FUN), silent=TRUE) + if (inherits(ooo, "try-error")) { + cat(as.character(ooo), "\n\n") + out[4] <- 1L + } else { + cat("OK\n\n") + } + out + } > #evalfun("str") > > toEval <- c("plot", + "traceplot", + "densplot", + "pairs", + "densityplot", + "qqmath", + "xyplot", + "acfplot", + "crosscorr.plot", + "dcdiag", + "dctable", + "nclones", + "dcsd", + "as.matrix", + "as.array", + "nvar", + "varnames", + "chanames", + "nchain", + "niter", + "crosscorr", + "mcpar", + "thin", + "coef", + "vcov", + # "confint", + "quantile", + "start", + "end", + "frequency", + "time", + "window", + "stack", + "str", + "head", + "tail", + "autocorr.diag", + "lambdamax.diag", + "chisq.diag", + "gelman.diag", + "geweke.diag", + "raftery.diag", + "heidel.diag", + "cumuplot", + "HPDinterval", + "rejectionRate") > > res <- list() > for (i in toEval) { + res[[i]] <- evalfun(i) + } *** plot *** --- plot --- MCMClist --- OK --- plot --- codaMCMC --- OK --- plot --- dcCodaMCMC --- OK --- plot --- dcmle --- OK *** traceplot *** --- traceplot --- MCMClist --- OK --- traceplot --- codaMCMC --- OK --- traceplot --- dcCodaMCMC --- OK --- traceplot --- dcmle --- OK *** densplot *** --- densplot --- MCMClist --- OK --- densplot --- codaMCMC --- OK --- densplot --- dcCodaMCMC --- OK --- densplot --- dcmle --- OK *** pairs *** --- pairs --- MCMClist --- OK --- pairs --- codaMCMC --- OK --- pairs --- dcCodaMCMC --- OK --- pairs --- dcmle --- OK *** densityplot *** --- densityplot --- MCMClist --- OK --- densityplot --- codaMCMC --- OK --- densityplot --- dcCodaMCMC --- OK --- densityplot --- dcmle --- OK *** qqmath *** --- qqmath --- MCMClist --- OK --- qqmath --- codaMCMC --- OK --- qqmath --- dcCodaMCMC --- OK --- qqmath --- dcmle --- OK *** xyplot *** --- xyplot --- MCMClist --- OK --- xyplot --- codaMCMC --- OK --- xyplot --- dcCodaMCMC --- OK --- xyplot --- dcmle --- OK *** acfplot *** --- acfplot --- MCMClist --- OK --- acfplot --- codaMCMC --- OK --- acfplot --- dcCodaMCMC --- OK --- acfplot --- dcmle --- OK *** crosscorr.plot *** --- crosscorr.plot --- MCMClist --- OK --- crosscorr.plot --- codaMCMC --- OK --- crosscorr.plot --- dcCodaMCMC --- OK --- crosscorr.plot --- dcmle --- OK *** dcdiag *** --- dcdiag --- MCMClist --- OK --- dcdiag --- codaMCMC --- OK --- dcdiag --- dcCodaMCMC --- OK --- dcdiag --- dcmle --- OK *** dctable *** --- dctable --- MCMClist --- OK --- dctable --- codaMCMC --- OK --- dctable --- dcCodaMCMC --- OK --- dctable --- dcmle --- OK *** nclones *** --- nclones --- MCMClist --- OK --- nclones --- codaMCMC --- OK --- nclones --- dcCodaMCMC --- OK --- nclones --- dcmle --- OK *** dcsd *** --- dcsd --- MCMClist --- OK --- dcsd --- codaMCMC --- OK --- dcsd --- dcCodaMCMC --- OK --- dcsd --- dcmle --- OK *** as.matrix *** --- as.matrix --- MCMClist --- OK --- as.matrix --- codaMCMC --- OK --- as.matrix --- dcCodaMCMC --- OK --- as.matrix --- dcmle --- OK *** as.array *** --- as.array --- MCMClist --- OK --- as.array --- codaMCMC --- OK --- as.array --- dcCodaMCMC --- OK --- as.array --- dcmle --- OK *** nvar *** --- nvar --- MCMClist --- OK --- nvar --- codaMCMC --- OK --- nvar --- dcCodaMCMC --- OK --- nvar --- dcmle --- OK *** varnames *** --- varnames --- MCMClist --- OK --- varnames --- codaMCMC --- OK --- varnames --- dcCodaMCMC --- OK --- varnames --- dcmle --- OK *** chanames *** --- chanames --- MCMClist --- OK --- chanames --- codaMCMC --- OK --- chanames --- dcCodaMCMC --- OK --- chanames --- dcmle --- OK *** nchain *** --- nchain --- MCMClist --- OK --- nchain --- codaMCMC --- OK --- nchain --- dcCodaMCMC --- OK --- nchain --- dcmle --- OK *** niter *** --- niter --- MCMClist --- OK --- niter --- codaMCMC --- OK --- niter --- dcCodaMCMC --- OK --- niter --- dcmle --- OK *** crosscorr *** --- crosscorr --- MCMClist --- OK --- crosscorr --- codaMCMC --- OK --- crosscorr --- dcCodaMCMC --- OK --- crosscorr --- dcmle --- OK *** mcpar *** --- mcpar --- MCMClist --- OK --- mcpar --- codaMCMC --- OK --- mcpar --- dcCodaMCMC --- OK --- mcpar --- dcmle --- OK *** thin *** --- thin --- MCMClist --- OK --- thin --- codaMCMC --- OK --- thin --- dcCodaMCMC --- OK --- thin --- dcmle --- OK *** coef *** --- coef --- MCMClist --- OK --- coef --- codaMCMC --- OK --- coef --- dcCodaMCMC --- OK --- coef --- dcmle --- OK *** vcov *** --- vcov --- MCMClist --- OK --- vcov --- codaMCMC --- OK --- vcov --- dcCodaMCMC --- OK --- vcov --- dcmle --- OK *** quantile *** --- quantile --- MCMClist --- OK --- quantile --- codaMCMC --- OK --- quantile --- dcCodaMCMC --- OK --- quantile --- dcmle --- OK *** start *** --- start --- MCMClist --- OK --- start --- codaMCMC --- OK --- start --- dcCodaMCMC --- OK --- start --- dcmle --- OK *** end *** --- end --- MCMClist --- OK --- end --- codaMCMC --- OK --- end --- dcCodaMCMC --- OK --- end --- dcmle --- OK *** frequency *** --- frequency --- MCMClist --- OK --- frequency --- codaMCMC --- OK --- frequency --- dcCodaMCMC --- OK --- frequency --- dcmle --- OK *** time *** --- time --- MCMClist --- OK --- time --- codaMCMC --- OK --- time --- dcCodaMCMC --- OK --- time --- dcmle --- OK *** window *** --- window --- MCMClist --- OK --- window --- codaMCMC --- OK --- window --- dcCodaMCMC --- OK --- window --- dcmle --- OK *** stack *** --- stack --- MCMClist --- OK --- stack --- codaMCMC --- OK --- stack --- dcCodaMCMC --- OK --- stack --- dcmle --- OK *** str *** --- str --- MCMClist --- List of 3 $ : 'mcmc' num [1:5000, 1:3] 0.611 0.653 0.629 0.613 0.585 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.666 0.624 0.607 0.573 0.638 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 $ : 'mcmc' num [1:5000, 1:3] 0.566 0.56 0.584 0.572 0.615 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..- attr(*, "mcpar")= num [1:3] 1001 6000 1 - attr(*, "class")= chr "mcmc.list" OK --- str --- codaMCMC --- Formal class 'codaMCMC' [package "dcmle"] with 8 slots ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 OK --- str --- dcCodaMCMC --- Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots ..@ dctable :List of 3 .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. ..- attr(*, "class")= chr "dctable" ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. ..$ n.clones : num 1 .. ..$ lambda.max: num 0.0302 .. ..$ ms.error : num 0.102 .. ..$ r.squared : num 0.0109 .. ..$ r.hat : num 1 ..@ nclones : NULL ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... ..@ varnames: chr [1:3] "alpha" "beta" "sigma" ..@ start : int 1001 ..@ end : int 6000 ..@ thin : int 1 ..@ nchains : int 3 ..@ niter : int 5000 ..@ nvar : int 3 OK --- str --- dcmle --- Formal class 'dcmle' [package "dcmle"] with 7 slots ..@ call : symbol ..@ coef : Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ fullcoef: Named num [1:3] 0.601 -1.022 0.481 .. ..- attr(*, "names")= chr [1:3] "alpha" "beta" "sigma" ..@ vcov : num [1:3, 1:3] 2.31e-03 4.13e-05 -1.49e-05 4.13e-05 3.02e-02 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" .. .. ..$ : chr [1:3] "alpha" "beta" "sigma" ..@ details :Formal class 'dcCodaMCMC' [package "dcmle"] with 11 slots .. .. ..@ dctable :List of 3 .. .. .. ..$ alpha:'data.frame': 1 obs. of 9 variables: .. .. .. ..$ beta :'data.frame': 1 obs. of 9 variables: .. .. .. ..$ sigma:'data.frame': 1 obs. of 9 variables: .. .. .. ..- attr(*, "class")= chr "dctable" .. .. ..@ dcdiag :Classes 'dcdiag' and 'data.frame': 1 obs. of 5 variables: .. .. .. ..$ n.clones : num 1 .. .. .. ..$ lambda.max: num 0.0302 .. .. .. ..$ ms.error : num 0.102 .. .. .. ..$ r.squared : num 0.0109 .. .. .. ..$ r.hat : num 1 .. .. ..@ nclones : NULL .. .. ..@ values : num [1:45000] 0.611 0.653 0.629 0.613 0.585 ... .. .. ..@ varnames: chr [1:3] "alpha" "beta" "sigma" .. .. ..@ start : int 1001 .. .. ..@ end : int 6000 .. .. ..@ thin : int 1 .. .. ..@ nchains : int 3 .. .. ..@ niter : int 5000 .. .. ..@ nvar : int 3 ..@ nobs : int NA ..@ method : chr "DataCloningMCMC" OK *** head *** --- head --- MCMClist --- OK --- head --- codaMCMC --- OK --- head --- dcCodaMCMC --- OK --- head --- dcmle --- OK *** tail *** --- tail --- MCMClist --- OK --- tail --- codaMCMC --- OK --- tail --- dcCodaMCMC --- OK --- tail --- dcmle --- OK *** autocorr.diag *** --- autocorr.diag --- MCMClist --- OK --- autocorr.diag --- codaMCMC --- OK --- autocorr.diag --- dcCodaMCMC --- OK --- autocorr.diag --- dcmle --- OK *** lambdamax.diag *** --- lambdamax.diag --- MCMClist --- OK --- lambdamax.diag --- codaMCMC --- OK --- lambdamax.diag --- dcCodaMCMC --- OK --- lambdamax.diag --- dcmle --- OK *** chisq.diag *** --- chisq.diag --- MCMClist --- OK --- chisq.diag --- codaMCMC --- OK --- chisq.diag --- dcCodaMCMC --- OK --- chisq.diag --- dcmle --- OK *** gelman.diag *** --- gelman.diag --- MCMClist --- OK --- gelman.diag --- codaMCMC --- OK --- gelman.diag --- dcCodaMCMC --- OK --- gelman.diag --- dcmle --- OK *** geweke.diag *** --- geweke.diag --- MCMClist --- OK --- geweke.diag --- codaMCMC --- OK --- geweke.diag --- dcCodaMCMC --- OK --- geweke.diag --- dcmle --- OK *** raftery.diag *** --- raftery.diag --- MCMClist --- OK --- raftery.diag --- codaMCMC --- OK --- raftery.diag --- dcCodaMCMC --- OK --- raftery.diag --- dcmle --- OK *** heidel.diag *** --- heidel.diag --- MCMClist --- OK --- heidel.diag --- codaMCMC --- OK --- heidel.diag --- dcCodaMCMC --- OK --- heidel.diag --- dcmle --- OK *** cumuplot *** --- cumuplot --- MCMClist --- OK --- cumuplot --- codaMCMC --- OK --- cumuplot --- dcCodaMCMC --- OK --- cumuplot --- dcmle --- OK *** HPDinterval *** --- HPDinterval --- MCMClist --- OK --- HPDinterval --- codaMCMC --- Error in UseMethod("HPDinterval") : no applicable method for 'HPDinterval' applied to an object of class "codaMCMC" --- HPDinterval --- dcCodaMCMC --- Error in UseMethod("HPDinterval") : no applicable method for 'HPDinterval' applied to an object of class "c('dcCodaMCMC', 'codaMCMC')" --- HPDinterval --- dcmle --- Error in UseMethod("HPDinterval") : no applicable method for 'HPDinterval' applied to an object of class "dcmle" *** rejectionRate *** --- rejectionRate --- MCMClist --- OK --- rejectionRate --- codaMCMC --- Error in UseMethod("rejectionRate") : no applicable method for 'rejectionRate' applied to an object of class "codaMCMC" --- rejectionRate --- dcCodaMCMC --- Error in UseMethod("rejectionRate") : no applicable method for 'rejectionRate' applied to an object of class "c('dcCodaMCMC', 'codaMCMC')" --- rejectionRate --- dcmle --- Error in UseMethod("rejectionRate") : no applicable method for 'rejectionRate' applied to an object of class "dcmle" > > evalfun("confint") *** confint *** --- confint --- MCMClist --- Error in confint(regmod_MCMClist) : 'confint' method not defined for k=1 --- confint --- codaMCMC --- Error in confint(regmod_codaMCMC) : 'confint' method not defined for k=1 --- confint --- dcCodaMCMC --- Error in confint(regmod_dcCodaMCMC) : 'confint' method not defined for k=1 --- confint --- dcmle --- Error in confint(regmod_dcmle) : 'confint' method not defined for k=1 MCMClist codaMCMC dcCodaMCMC dcmle 1 1 1 1 > attr(regmod, "n.clones") <- 2 > regmod_MCMClist <- as(regmod, "MCMClist") > regmod_codaMCMC <- as(regmod, "codaMCMC") > regmod_dcCodaMCMC <- as(regmod, "dcCodaMCMC") > regmod_dcmle <- as(regmod, "dcmle") > evalfun("confint") *** confint *** --- confint --- MCMClist --- OK --- confint --- codaMCMC --- Error in confint(regmod_codaMCMC) : 'confint' method not defined for k=1 --- confint --- dcCodaMCMC --- OK --- confint --- dcmle --- OK MCMClist codaMCMC dcCodaMCMC dcmle 0 1 0 0 > > ## testing stats/coda methods > > #tmp <- mcmc(cbind(z=c(1,1,1,1), a=c(0,0,0,0), q2=c(-1,-1,-1,-1)), > # start=101, end=107, thin=2) > #x <- as.mcmc.list(list(tmp, tmp+0.5, tmp-0.5)) > #rm(tmp) > > ## update > ## show, summary > ## [, [[ > > tmp <- do.call(rbind, res) > > ## --------- TOTAL ----------- > colSums(tmp) MCMClist codaMCMC dcCodaMCMC dcmle 0 2 2 2 > tmp[rowSums(tmp) != 0,] MCMClist codaMCMC dcCodaMCMC dcmle HPDinterval 0 1 1 1 rejectionRate 0 1 1 1 > > > proc.time() user system elapsed 43.89 3.75 47.64