R Under development (unstable) (2021-10-25 r81099) -- "Unsuffered Consequences" Copyright (C) 2021 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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. Natural language support but running in an English locale 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. > pkgname <- "circglmbayes" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('circglmbayes') > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("BF.circGLM") > ### * BF.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: BF.circGLM > ### Title: Obtain Bayes Factors or posterior odds from circGLM objects > ### Aliases: BF.circGLM > > ### ** Examples > > dat <- generateCircGLMData(truebeta = c(0, .2), truedelta = c(.4, .01)) > m <- circGLM(th ~ ., dat) > BF.circGLM(m) $BF_Beta BF(bt>0:bt<0) BF(bt==0:bt=/=0) l1 0.66389 22.44200 l2 999.00000 0.13476 $PMP_Beta_Ineq P(bt>0) P(bt<0) l1 0.399 0.601 l2 0.999 0.001 $PMP_Beta_Eq P(bt==0) P(bt=/=0) l1 0.95734 0.04266 l2 0.11876 0.88124 $BF_Mean Comparison [mu_a, mu_b] BF(mu_a>mu_b:mu_amu_b) P(mu_a > dat <- generateCircGLMData(nconpred = 0) > m <- circGLM(th ~ ., dat) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6076:22: runtime error: reference binding to null pointer of type 'const double' #0 0x7f284dd33ded in arma::Mat::at(unsigned int, unsigned int) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6076:10 #1 0x7f284dd33ded in void arma::subview::inplace_op, arma::op_htrans> >(arma::Base, arma::op_htrans> > const&, char const*) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:170:28 #2 0x7f284dce9e0d in void arma::subview::operator=, arma::op_htrans> >(arma::Base, arma::op_htrans> > const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:537:3 #3 0x7f284dce9e0d in void arma::subview_row::operator=, arma::op_htrans> >(arma::Base, arma::op_htrans> > const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:4322:16 #4 0x7f284dce9e0d in circGLMC(arma::Col, arma::Mat, arma::Mat, arma::Col, arma::Mat, arma::Col, int, int, arma::Col, double, double, int, double, bool, int, bool, bool) /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/circGLM.cpp:810:26 #5 0x7f284dcb2361 in _circglmbayes_circGLMC /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/RcppExports.cpp:190:34 #6 0x6d92d3 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:679:17 #7 0x724239 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1284:11 #8 0x835a78 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128:14 #9 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #10 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #11 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #12 0x842d9f in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12 #13 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #14 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #15 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #16 0x81ed88 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12 #17 0x8931d6 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2982:8 #18 0x81e738 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12 #19 0x94e206 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #20 0x951750 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:316:11 #21 0x951559 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1129:5 #22 0x4e247a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #23 0x7f285ca58081 in __libc_start_main (/lib64/libc.so.6+0x27081) #24 0x43129d in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x43129d) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6076:22 in /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6088:10: runtime error: reference binding to null pointer of type 'const double' #0 0x7f284dd32ddf in arma::Mat::at(unsigned int, unsigned int) const /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6088:3 #1 0x7f284dd32ddf in arma::subview::extract(arma::Mat&, arma::subview const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:1613:31 #2 0x7f284dcea49c in arma::Mat::Mat(arma::subview const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:1973:3 #3 0x7f284dcea49c in circGLMC(arma::Col, arma::Mat, arma::Mat, arma::Col, arma::Mat, arma::Col, int, int, arma::Col, double, double, int, double, bool, int, bool, bool) /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/circGLM.cpp:818:28 #4 0x7f284dcb2361 in _circglmbayes_circGLMC /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/RcppExports.cpp:190:34 #5 0x6d92d3 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:679:17 #6 0x724239 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1284:11 #7 0x835a78 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128:14 #8 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #9 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #10 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #11 0x842d9f in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12 #12 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #13 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #14 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #15 0x81ed88 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12 #16 0x8931d6 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2982:8 #17 0x81e738 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12 #18 0x94e206 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #19 0x951750 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:316:11 #20 0x951559 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1129:5 #21 0x4e247a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #22 0x7f285ca58081 in __libc_start_main (/lib64/libc.so.6+0x27081) #23 0x43129d in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x43129d) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6088:10 in /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6088:10: runtime error: applying non-zero offset 8 to null pointer #0 0x7f284dd32db1 in arma::Mat::at(unsigned int, unsigned int) const /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6088:10 #1 0x7f284dd32db1 in arma::subview::extract(arma::Mat&, arma::subview const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:1613:31 #2 0x7f284dcea49c in arma::Mat::Mat(arma::subview const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:1973:3 #3 0x7f284dcea49c in circGLMC(arma::Col, arma::Mat, arma::Mat, arma::Col, arma::Mat, arma::Col, int, int, arma::Col, double, double, int, double, bool, int, bool, bool) /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/circGLM.cpp:818:28 #4 0x7f284dcb2361 in _circglmbayes_circGLMC /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/RcppExports.cpp:190:34 #5 0x6d92d3 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:679:17 #6 0x724239 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1284:11 #7 0x835a78 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128:14 #8 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #9 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #10 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #11 0x842d9f in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12 #12 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #13 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #14 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #15 0x81ed88 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12 #16 0x8931d6 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2982:8 #17 0x81e738 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12 #18 0x94e206 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #19 0x951750 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:316:11 #20 0x951559 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1129:5 #21 0x4e247a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #22 0x7f285ca58081 in __libc_start_main (/lib64/libc.so.6+0x27081) #23 0x43129d in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x43129d) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6088:10 in /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6076:22: runtime error: applying non-zero offset 8 to null pointer #0 0x7f284dd33dc0 in arma::Mat::at(unsigned int, unsigned int) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6076:22 #1 0x7f284dd33dc0 in void arma::subview::inplace_op, arma::op_htrans> >(arma::Base, arma::op_htrans> > const&, char const*) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:170:28 #2 0x7f284dce9e0d in void arma::subview::operator=, arma::op_htrans> >(arma::Base, arma::op_htrans> > const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:537:3 #3 0x7f284dce9e0d in void arma::subview_row::operator=, arma::op_htrans> >(arma::Base, arma::op_htrans> > const&) /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:4322:16 #4 0x7f284dce9e0d in circGLMC(arma::Col, arma::Mat, arma::Mat, arma::Col, arma::Mat, arma::Col, int, int, arma::Col, double, double, int, double, bool, int, bool, bool) /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/circGLM.cpp:810:26 #5 0x7f284dcb2361 in _circglmbayes_circGLMC /data/gannet/ripley/R/packages/tests-clang-SAN/circglmbayes/src/RcppExports.cpp:190:34 #6 0x6d92d3 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:679:17 #7 0x724239 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1284:11 #8 0x835a78 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128:14 #9 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #10 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #11 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #12 0x842d9f in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12 #13 0x81e34e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8 #14 0x887157 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c #15 0x882abf in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16 #16 0x81ed88 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12 #17 0x8931d6 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2982:8 #18 0x81e738 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12 #19 0x94e206 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2 #20 0x951750 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:316:11 #21 0x951559 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1129:5 #22 0x4e247a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #23 0x7f285ca58081 in __libc_start_main (/lib64/libc.so.6+0x27081) #24 0x43129d in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x43129d) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6076:22 in > BF.circGLM(m) $BF_Beta NULL $PMP_Beta_Ineq P(bt>0) P(bt<0) $PMP_Beta_Eq P(bt==0) P(bt=/=0) $BF_Mean Comparison [mu_a, mu_b] BF(mu_a>mu_b:mu_amu_b) P(mu_a > dat <- generateCircGLMData(ncatpred = 0) > m <- circGLM(th ~ ., dat) > BF.circGLM(m) $BF_Beta BF(bt>0:bt<0) BF(bt==0:bt=/=0) l1 1000 5e-05 l2 1000 0e+00 $PMP_Beta_Ineq P(bt>0) P(bt<0) l1 0.999 0.001 l2 0.999 0.001 $PMP_Beta_Eq P(bt==0) P(bt=/=0) l1 5e-05 0.99995 l2 0e+00 1.00000 $BF_Mean NULL $PMP_Mean_Ineq P(mu_a>mu_b) P(mu_a > > > > cleanEx() > nameEx("IC_compare.circGLM") > ### * IC_compare.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: IC_compare.circGLM > ### Title: Compare the information criteria of several circGLM models. > ### Aliases: IC_compare.circGLM > > ### ** Examples > > Xcat <- c(rep(0, 5), rep(1, 5)) > th <- rvmc(10, 0, 4) + Xcat > > # Compare a model that includes group differences with a model that does not. > IC_compare.circGLM(circGLM(th = th), circGLM(th = th, X = Xcat)) circGLM(th = th) circGLM(th = th, X = Xcat) n_par 2 3 lppd -3.430257 -1.0132 AIC_Bayes 10.4832 7.927708 DIC 10.41982 6.906482 DIC_alt 11.11434 8.174809 WAIC1 10.0425 6.80779 WAIC2 10.74327 8.174321 p_DIC 1.968312 2.489387 p_DIC_alt 2.315574 3.123551 p_WAIC1 1.590995 2.390695 p_WAIC2 1.941376 3.07396 > > > > cleanEx() > nameEx("cglmShiny") > ### * cglmShiny > > flush(stderr()); flush(stdout()) > > ### Name: cglmShiny > ### Title: cglmShiny > ### Aliases: cglmShiny > > ### ** Examples > > > ## Not run: > ##D cglmShiny() > ## End(Not run) > > > > > cleanEx() > nameEx("circGLM") > ### * circGLM > > flush(stderr()); flush(stdout()) > > ### Name: circGLM > ### Title: Fitting Bayesian circular General Linear Models > ### Aliases: circGLM > > ### ** Examples > > dat <- generateCircGLMData() > m <- circGLM(th ~ ., dat) > print(m) Bayesian circular GLM Call: circGLM(formula = th ~ ., data = dat) MCMC run for 1000 its, 1000 used. Coefficients: Estimate SD LB UB Intercept 1.403 0.167 1.138 1.758 Kappa 6.360 2.160 3.564 11.784 l1 0.235 0.055 0.122 0.338 l2 0.227 0.052 0.112 0.317 c1 1.036 0.175 0.672 1.319 c2 1.150 0.210 0.783 1.477 DIC: 37.975 WAIC: 36.879 > print(m, type = "all") [,1] b0_meandir 1.403 kp_mean 7.291 kp_mode 6.360 kp_propacc 1.000 lppd -13.084 n_par 6.000 ll_th_estpars -12.535 AIC_Bayes 37.071 p_DIC 6.452 p_DIC_alt 30.648 DIC 37.975 DIC_alt 86.367 p_WAIC1 5.356 p_WAIC2 6.506 WAIC1 36.879 WAIC2 39.180 SavedIts 1000.000 TotalIts 1000.000 thin 1.000 burnin 0.000 r 2.000 $b0_CCI Beta_0 LB 1.137513 UB 1.758165 $kp_HDI Kappa LB 3.564206 UB 11.784274 $bt_mean l1 l2 [1,] 0.2348029 0.2268319 $bt_CCI l1 l2 LB 0.1223484 0.1121267 UB 0.3376940 0.3171914 $bt_propacc l1 l2 [1,] 0.654 0.63 $dt_meandir c1 c2 MeanDir 1.036014 1.149935 $dt_CCI c1 c2 LB 0.6724094 0.7831062 UB 1.3189434 1.4767410 $dt_propacc c1 c2 ProportionAccepted 0.798 0.783 $zt_mean l1_zt l2_zt [1,] 0.1464302 0.141673 $zt_mdir l1_zt l2_zt [1,] 0.1464722 0.1417149 $zt_CCI l1_zt l2_zt LB 0.07750421 0.07108516 UB 0.20732798 0.19553976 $DeltaIneqBayesFactors BF(dt>0:dt<0) c1 1000.0000 c2 141.8571 $BetaIneqBayesFactors [,1] l1 199 l2 999 $BetaSDDBayesFactors [,1] l1 0.2755686 l2 0.1672975 $MuIneqBayesFactors [,1] [Reference, c1] 0.001000000 [Reference, c2] 0.007049345 [c1, c2] 0.424501425 $TimeTaken Time (sec) Initialization 0.000000 Loop 0.173588 Post-processing 0.005964 Total 0.179552 $SDDBFDensEstMethod [1] "density" $BetaBayesFactors BF(bt>0:bt<0) BF(bt==0:bt=/=0) l1 199 0.2755686 l2 999 0.1672975 $MuBayesFactors Comparison [mu_a, mu_b] BF(mu_a>mu_b:mu_a plot(m, type = "tracestack") > > > > cleanEx() > nameEx("coef.circGLM") > ### * coef.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: coef.circGLM > ### Title: Extract circGLM Coefficients > ### Aliases: coef.circGLM > > ### ** Examples > > coef(circGLM(th = rvmc(10, 0, 1))) Estimate SD LB UB Intercept 0.186294 0.3996290 -0.5964590 1.001452 Kappa 1.408409 0.7207282 0.2815604 3.031182 > > > > > cleanEx() > nameEx("estimateDensityBySpline") > ### * estimateDensityBySpline > > flush(stderr()); flush(stdout()) > > ### Name: estimateDensityBySpline > ### Title: Estimate the density value from a sample by a spline > ### interpolation of the kernel density > ### Aliases: estimateDensityBySpline > > ### ** Examples > > # Compare the estimate from this function with the analytic result. > estimateDensityBySpline(rnorm(1000), 0.1) [1] 0.365109 > dnorm(.1) [1] 0.3969525 > > > > > cleanEx() > nameEx("generateCircGLMData") > ### * generateCircGLMData > > flush(stderr()); flush(stdout()) > > ### Name: generateCircGLMData > ### Title: Generate data that follows the circular GLM model > ### Aliases: generateCircGLMData > > ### ** Examples > > > # Von Mises data with mean 2, kappa 3. > generateCircGLMData(truebeta0 = 2, residkappa = 3, + nconpred = 0, ncatpred = 0) th [1,] 2.2535508 [2,] 1.9439969 [3,] 2.9860055 [4,] 2.5564118 [5,] 2.3861946 [6,] 1.8014955 [7,] 1.7446258 [8,] 1.6108045 [9,] 1.4689834 [10,] 2.1728400 [11,] 3.4192557 [12,] 2.4271864 [13,] 0.6056226 [14,] 1.9358793 [15,] 1.4078532 [16,] 1.6719153 [17,] 1.4745910 [18,] 1.6549866 [19,] 0.9292550 [20,] 3.2440974 [21,] 1.8887716 [22,] 2.2264450 [23,] 2.4896893 [24,] 1.2347040 [25,] 1.8004270 [26,] 0.8585888 [27,] 2.1362146 [28,] 2.0940127 [29,] 1.8395926 [30,] 1.4208293 attr(,"truebeta0") [1] 2 attr(,"truebeta") numeric(0) attr(,"truezeta") numeric(0) attr(,"residkappa") [1] 3 attr(,"linkfun") function (x) 2 * atan(x) attr(,"u") [1] 1 > > # circGLM data > generateCircGLMData(n = 20, nconpred = 4, truebeta = c(0, 0.4, 0.2, 0.05)) th l1 l2 l3 l4 c1 c2 [1,] 3.159873 0.39359812 -0.71390422 0.76349910 1.7577461 1 1 [2,] 1.790513 -1.86400530 1.03519119 -1.19914905 1.6738869 0 0 [3,] 1.800591 0.56105731 -0.53701162 1.87161232 0.4148988 0 0 [4,] 2.589869 0.40192407 1.35516448 -0.37492539 -1.1094827 1 0 [5,] 3.823774 0.15397405 0.60246222 1.92745487 0.1433941 1 0 [6,] 3.060387 0.09151173 1.40864344 -0.28175564 1.6880076 0 0 [7,] 2.831283 0.41400948 -1.27506321 -0.87321963 -0.3376806 1 0 [8,] 2.187062 -0.81318384 -0.18601212 0.18094355 0.9604901 1 0 [9,] 2.023534 -0.09578015 -1.28446310 0.18315450 -0.8455924 0 0 [10,] 1.616810 0.96481195 0.54018583 -1.62120042 0.8498536 1 0 [11,] 3.420797 1.55628318 -0.04846938 1.26754332 -0.8270787 1 1 [12,] 0.515243 0.26024022 -0.54491219 -1.02887352 -1.1082656 0 0 [13,] 4.147649 -0.09386402 1.60218005 0.50874504 -0.8281518 0 1 [14,] 2.564904 -1.16936405 0.08654757 0.67693715 -0.7393633 0 1 [15,] 2.664601 -1.88091381 1.03464405 0.29999337 -0.7810496 0 0 [16,] 3.374456 -1.01368301 0.76945135 0.02860469 0.9027580 0 0 [17,] 2.278781 1.76359912 -1.15587799 0.36300158 0.2170219 0 1 [18,] 1.779764 1.11105243 -0.95726368 -0.97508453 -0.1828034 1 1 [19,] 3.422839 -0.23164953 -0.13881343 -0.69457214 -0.9602620 1 1 [20,] 2.171759 -0.50961793 -1.59267925 -1.02270920 -0.8883271 1 1 attr(,"truebeta0") [1] 1.570796 attr(,"truebeta") [1] 0.00 0.40 0.20 0.05 attr(,"truezeta") [1] 0.0000000 0.2422379 0.1256659 0.0318045 attr(,"residkappa") [1] 5 attr(,"linkfun") function (x) 2 * atan(x) attr(,"u") [1] 0.7 > > > > > cleanEx() > nameEx("getPMP") > ### * getPMP > > flush(stderr()); flush(stdout()) > > ### Name: getPMP > ### Title: Obtain posterior model probabilities > ### Aliases: getPMP > > ### ** Examples > > getPMP(3) [,1] [,2] [1,] 0.75 0.25 > > > > > cleanEx() > nameEx("mcmc_summary.circGLM") > ### * mcmc_summary.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: mcmc_summary.circGLM > ### Title: Obtain different central tendencies and CIs from a circGLM > ### object > ### Aliases: mcmc_summary.circGLM > > ### ** Examples > > dat <- generateCircGLMData() > m <- circGLM(th ~ ., dat) > mcmc_summary.circGLM(m) Mean Median Mode SD LB b0_chain 1.4032251 1.3867744 1.3462783 0.16479602 1.0583246 dt_chain.1 1.0360140 1.0425598 1.0704851 0.17397796 0.6970144 dt_chain.2 1.1499351 1.1585066 1.1656636 0.20538506 0.8687742 mu_chain.Reference 1.4032251 1.3867744 1.3462783 0.16479602 1.0583246 mu_chain.c1 2.4400934 2.4369877 2.4176785 0.12916160 2.2068948 mu_chain.c2 2.5515165 2.5614283 2.5771693 0.14298417 2.2686354 kp_chain 7.2906145 7.1577524 6.3602355 2.15984364 3.5642062 bt_chain.1 0.2348029 0.2331972 0.2182859 0.05528073 0.1395201 bt_chain.2 0.2268319 0.2297045 0.2310939 0.05170693 0.1177659 UB b0_chain 1.6428448 dt_chain.1 1.3317680 dt_chain.2 1.5277612 mu_chain.Reference 1.6428448 mu_chain.c1 2.7156473 mu_chain.c2 2.8233713 kp_chain 11.7842737 bt_chain.1 0.3429952 bt_chain.2 0.3171914 > > > > > cleanEx() > nameEx("medianDirection") > ### * medianDirection > > flush(stderr()); flush(stdout()) > > ### Name: medianDirection > ### Title: Compute the median direction > ### Aliases: medianDirection > > ### ** Examples > > medianDirection(rvmc(30, 0, 2)) [1] -0.1355875 > > > > cleanEx() > nameEx("modalDirection") > ### * modalDirection > > flush(stderr()); flush(stdout()) > > ### Name: modalDirection > ### Title: Estimate the modal direction > ### Aliases: modalDirection > > ### ** Examples > > modalDirection(rvmc(30, 0, 2)) [1] 0.2372185 > > > > > cleanEx() > nameEx("plot.circGLM") > ### * plot.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: plot.circGLM > ### Title: Plot circGLM object > ### Aliases: plot.circGLM > > ### ** Examples > > plot(circGLM(th = rvmc(10, 1, 1))) > > dat <- generateCircGLMData(n = 100, nconpred = 1, ncatpred = 1) > m <- circGLM(th ~ ., dat, Q = 100, burnin = 0) > > # Traceplot by default > plot(m) > > # Traceplot stack > plot(m, type = "tracestack") > > # Prediction plot > plot(m, type = "predict") > > # Mean comparisons > plot(m, type = "meancompare") > plot(m, type = "meanboxplot") > > > > > cleanEx() > nameEx("plot_meanboxplot.circGLM") > ### * plot_meanboxplot.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: plot_meanboxplot.circGLM > ### Title: Plot mean comparison boxplot from circGLM objects > ### Aliases: plot_meanboxplot.circGLM > > ### ** Examples > > dat <- generateCircGLMData(nconpred = 0) > m <- circGLM(th ~ ., dat) > plot_meancompare.circGLM(m) > > > > cleanEx() > nameEx("plot_meancompare.circGLM") > ### * plot_meancompare.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: plot_meancompare.circGLM > ### Title: Plot mean comparisons for a circGLM object > ### Aliases: plot_meancompare.circGLM > > ### ** Examples > > dat <- generateCircGLMData(nconpred = 0) > m <- circGLM(th ~ ., dat) > plot_meancompare.circGLM(m) > > > > cleanEx() > nameEx("plot_predict.circGLM") > ### * plot_predict.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: plot_predict.circGLM > ### Title: Create a prediction plot from a circGLM object > ### Aliases: plot_predict.circGLM > > ### ** Examples > > dat <- generateCircGLMData() > m <- circGLM(th ~ ., dat, Q = 100, burnin = 0) > plot(m, type = "predict") > > > > > cleanEx() > nameEx("plot_trace.circGLM") > ### * plot_trace.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: plot_trace.circGLM > ### Title: Make traceplots for circGLM > ### Aliases: plot_trace.circGLM > > ### ** Examples > > plot_trace.circGLM(circGLM(th = rvmc(10, 1, 1))) > > dat <- generateCircGLMData() > plot(circGLM(th ~., dat), type = "trace") > > > > > cleanEx() > nameEx("plot_tracestack.circGLM") > ### * plot_tracestack.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: plot_tracestack.circGLM > ### Title: Plot a stack of traceplots for a circGLM object > ### Aliases: plot_tracestack.circGLM > > ### ** Examples > > plot(circGLM(th = rvmc(100, 0, 1)), type = "tracestack") > > dat <- generateCircGLMData() > plot(circGLM(th ~ ., dat), type = "tracestack") > > > > > cleanEx() > nameEx("predict.circGLM") > ### * predict.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: predict.circGLM > ### Title: Obtain predictions for the circGLM model > ### Aliases: predict.circGLM > > ### ** Examples > > dat <- generateCircGLMData() > m <- circGLM(th ~ ., dat) > > # Predictions for the original outcome angles. > predict(m) [,1] [1,] 3.9250128 [2,] 2.3563370 [3,] 1.0848010 [4,] 2.0428257 [5,] 1.7342721 [6,] 1.8170179 [7,] 2.4583774 [8,] 3.8119665 [9,] 4.3522762 [10,] 2.7153047 [11,] 1.9462260 [12,] 1.3391912 [13,] 2.4034700 [14,] 1.6863131 [15,] 2.5003546 [16,] 0.8720388 [17,] 3.6712251 [18,] 3.2005696 [19,] 2.6737512 [20,] 3.2146891 [21,] 3.0004675 [22,] 1.3339587 [23,] 2.6678666 [24,] 0.9887587 [25,] 2.3422885 [26,] 4.5032173 [27,] 3.1883505 [28,] 2.3276179 [29,] 2.5175228 [30,] 1.4209316 > > # Predictions for new data > dat2 <- generateCircGLMData() > predict(m, newdata = dat2) [,1] [1,] 2.7077392 [2,] 3.8976838 [3,] 1.2127170 [4,] 3.1270668 [5,] 2.4764382 [6,] 3.0070879 [7,] 2.2088385 [8,] 2.0742216 [9,] 2.5184084 [10,] 0.8981935 [11,] 3.3498693 [12,] 2.8197618 [13,] 1.3937256 [14,] 2.3593175 [15,] 3.3621717 [16,] 2.3185661 [17,] 4.8203191 [18,] 2.6429774 [19,] 1.4572450 [20,] 3.0253629 [21,] 2.6795961 [22,] 3.0627812 [23,] 3.6789250 [24,] 2.6576370 [25,] 2.7374487 [26,] 1.8180842 [27,] 2.4097518 [28,] 2.6062387 [29,] 3.2668342 [30,] 2.6621071 > > > > cleanEx() > nameEx("predict_function.circGLM") > ### * predict_function.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: predict_function.circGLM > ### Title: Obtain a prediction function from a circGLM object > ### Aliases: predict_function.circGLM > > ### ** Examples > > dat <- generateCircGLMData() > m <- circGLM(th ~ ., dat) > predfun <- predict_function.circGLM(m) > newd <- generateCircGLMData() > > # Predicted values of the new data. > predfun(newd) [,1] [1,] 2.7077392 [2,] 3.8976838 [3,] 1.2127170 [4,] 3.1270668 [5,] 2.4764382 [6,] 3.0070879 [7,] 2.2088385 [8,] 2.0742216 [9,] 2.5184084 [10,] 0.8981935 [11,] 3.3498693 [12,] 2.8197618 [13,] 1.3937256 [14,] 2.3593175 [15,] 3.3621717 [16,] 2.3185661 [17,] 4.8203191 [18,] 2.6429774 [19,] 1.4572450 [20,] 3.0253629 [21,] 2.6795961 [22,] 3.0627812 [23,] 3.6789250 [24,] 2.6576370 [25,] 2.7374487 [26,] 1.8180842 [27,] 2.4097518 [28,] 2.6062387 [29,] 3.2668342 [30,] 2.6621071 > > > > cleanEx() > nameEx("print.circGLM") > ### * print.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: print.circGLM > ### Title: Print circGLM Object > ### Aliases: print.circGLM > > ### ** Examples > > print(circGLM(th = rvmc(10, 1, 1))) Bayesian circular GLM Call: circGLM(th = rvmc(10, 1, 1)) MCMC run for 1000 its, 1000 used. Coefficients: Estimate SD LB UB Intercept 1.186 0.400 0.404 2.001 Kappa 1.408 0.721 0.282 3.031 DIC: 33.033 WAIC: 32.85 > > dat <- generateCircGLMData() > cglmmod <- circGLM(th ~ ., dat) > > print(cglmmod) Bayesian circular GLM Call: circGLM(formula = th ~ ., data = dat) MCMC run for 1000 its, 1000 used. Coefficients: Estimate SD LB UB Intercept 1.621 0.215 1.183 2.026 Kappa 3.089 0.984 1.762 5.506 l1 0.293 0.071 0.161 0.446 l2 0.147 0.066 0.010 0.287 c1 0.819 0.254 0.327 1.301 c2 0.948 0.209 0.562 1.324 DIC: 60.902 WAIC: 60.36 > > print(cglmmod, type = "mcmc") Iterations = 0:999 Thinning interval = 1 Number of chains = 1 Sample size per chain = 1000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE b0_chain 1.62073 0.21531 0.006809 0.035512 kp_chain 3.58847 0.98371 0.031108 0.038382 bt_chain.1 0.29322 0.07072 0.002236 0.008182 bt_chain.2 0.14700 0.06630 0.002097 0.008893 dt_chain.1 0.81931 0.25415 0.008037 0.044970 dt_chain.2 0.94806 0.20873 0.006601 0.034910 zt_chain.1 0.18080 0.04127 0.001305 0.004763 zt_chain.2 0.09251 0.04098 0.001296 0.005493 mu_chain.Reference 1.62073 0.21531 0.006809 0.035512 mu_chain.c1 2.44004 0.20020 0.006331 0.024705 mu_chain.c2 2.56879 0.15651 0.004949 0.017144 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% b0_chain 1.185957 1.47216 1.62643 1.7768 2.0257 kp_chain 1.900448 2.86985 3.49707 4.2031 5.7436 bt_chain.1 0.161478 0.24775 0.28967 0.3385 0.4462 bt_chain.2 0.010815 0.10896 0.14572 0.1866 0.2867 dt_chain.1 0.327714 0.65400 0.81553 0.9972 1.3014 dt_chain.2 0.561832 0.80165 0.94526 1.0852 1.3241 zt_chain.1 0.101920 0.15461 0.17950 0.2078 0.2672 zt_chain.2 0.006884 0.06909 0.09212 0.1174 0.1778 mu_chain.Reference 1.185957 1.47216 1.62643 1.7768 2.0257 mu_chain.c1 2.046727 2.29902 2.43847 2.5785 2.8355 mu_chain.c2 2.251253 2.47067 2.57267 2.6717 2.8671 > > print(cglmmod, type = "all") [,1] b0_meandir 1.621 kp_mean 3.588 kp_mode 3.089 kp_propacc 1.000 lppd -25.135 n_par 6.000 ll_th_estpars -24.864 AIC_Bayes 61.728 p_DIC 5.587 p_DIC_alt 8.423 DIC 60.902 DIC_alt 66.575 p_WAIC1 5.045 p_WAIC2 6.019 WAIC1 60.360 WAIC2 62.308 SavedIts 1000.000 TotalIts 1000.000 thin 1.000 burnin 0.000 r 2.000 $b0_CCI Beta_0 LB 1.183157 UB 2.025635 $kp_HDI Kappa LB 1.761622 UB 5.505756 $bt_mean l1 l2 [1,] 0.2932225 0.146995 $bt_CCI l1 l2 LB 0.1614776 0.01047914 UB 0.4461518 0.28669771 $bt_propacc l1 l2 [1,] 0.736 0.722 $dt_meandir c1 c2 MeanDir 0.819046 0.9478997 $dt_CCI c1 c2 LB 0.3272452 0.5618007 UB 1.3008341 1.3239508 $dt_propacc c1 c2 ProportionAccepted 0.808 0.752 $zt_mean l1_zt l2_zt [1,] 0.1807963 0.09251183 $zt_mdir l1_zt l2_zt [1,] 0.1808 0.09248954 $zt_CCI l1_zt l2_zt LB 0.1019201 0.006670981 UB 0.2671570 0.177749730 $DeltaIneqBayesFactors BF(dt>0:dt<0) c1 1000 c2 1000 $BetaIneqBayesFactors [,1] l1 999.00000 l2 70.42857 $BetaSDDBayesFactors [,1] l1 0.0729432 l2 1.8603021 $MuIneqBayesFactors [,1] [Reference, c1] 0.0010000 [Reference, c2] 0.0010000 [c1, c2] 0.5015015 $TimeTaken Time (sec) Initialization 0.000000 Loop 0.295515 Post-processing 0.008943 Total 0.304458 $SDDBFDensEstMethod [1] "density" $BetaBayesFactors BF(bt>0:bt<0) BF(bt==0:bt=/=0) l1 999.00000 0.0729432 l2 70.42857 1.8603021 $MuBayesFactors Comparison [mu_a, mu_b] BF(mu_a>mu_b:mu_a > print(cglmmod, type = "coef") Estimate SD LB UB Intercept 1.621 0.215 1.183 2.026 Kappa 3.089 0.984 1.762 5.506 l1 0.293 0.071 0.161 0.446 l2 0.147 0.066 0.010 0.287 c1 0.819 0.254 0.327 1.301 c2 0.948 0.209 0.562 1.324 > > > > > cleanEx() > nameEx("print_all.circGLM") > ### * print_all.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: print_all.circGLM > ### Title: Print all results from a circGLM object > ### Aliases: print_all.circGLM > > ### ** Examples > > print(circGLM(th = rvmc(10, 1, 1)), type = "all") [,1] b0_meandir 1.186 kp_mean 1.544 kp_mode 1.408 kp_propacc 0.984 lppd -14.458 n_par 2.000 ll_th_estpars -14.367 AIC_Bayes 32.733 p_DIC 2.150 p_DIC_alt 2.498 DIC 33.033 DIC_alt 33.730 p_WAIC1 1.967 p_WAIC2 2.336 WAIC1 32.850 WAIC2 33.590 SavedIts 1000.000 TotalIts 1000.000 thin 1.000 burnin 0.000 r 2.000 $b0_CCI Beta_0 LB 0.403541 UB 2.001452 $kp_HDI Kappa LB 0.2815604 UB 3.0311821 $TimeTaken Time (sec) Initialization 0.000000 Loop 0.045409 Post-processing 0.003978 Total 0.049387 $SDDBFDensEstMethod [1] "density" > > dat <- generateCircGLMData() > cglmmod <- circGLM(th ~ ., dat) > print(cglmmod, type = "all") [,1] b0_meandir 1.621 kp_mean 3.588 kp_mode 3.089 kp_propacc 1.000 lppd -25.135 n_par 6.000 ll_th_estpars -24.864 AIC_Bayes 61.728 p_DIC 5.587 p_DIC_alt 8.423 DIC 60.902 DIC_alt 66.575 p_WAIC1 5.045 p_WAIC2 6.019 WAIC1 60.360 WAIC2 62.308 SavedIts 1000.000 TotalIts 1000.000 thin 1.000 burnin 0.000 r 2.000 $b0_CCI Beta_0 LB 1.183157 UB 2.025635 $kp_HDI Kappa LB 1.761622 UB 5.505756 $bt_mean l1 l2 [1,] 0.2932225 0.146995 $bt_CCI l1 l2 LB 0.1614776 0.01047914 UB 0.4461518 0.28669771 $bt_propacc l1 l2 [1,] 0.736 0.722 $dt_meandir c1 c2 MeanDir 0.819046 0.9478997 $dt_CCI c1 c2 LB 0.3272452 0.5618007 UB 1.3008341 1.3239508 $dt_propacc c1 c2 ProportionAccepted 0.808 0.752 $zt_mean l1_zt l2_zt [1,] 0.1807963 0.09251183 $zt_mdir l1_zt l2_zt [1,] 0.1808 0.09248954 $zt_CCI l1_zt l2_zt LB 0.1019201 0.006670981 UB 0.2671570 0.177749730 $DeltaIneqBayesFactors BF(dt>0:dt<0) c1 1000 c2 1000 $BetaIneqBayesFactors [,1] l1 999.00000 l2 70.42857 $BetaSDDBayesFactors [,1] l1 0.0729432 l2 1.8603021 $MuIneqBayesFactors [,1] [Reference, c1] 0.0010000 [Reference, c2] 0.0010000 [c1, c2] 0.5015015 $TimeTaken Time (sec) Initialization 0.000000 Loop 0.276523 Post-processing 0.008948 Total 0.285471 $SDDBFDensEstMethod [1] "density" $BetaBayesFactors BF(bt>0:bt<0) BF(bt==0:bt=/=0) l1 999.00000 0.0729432 l2 70.42857 1.8603021 $MuBayesFactors Comparison [mu_a, mu_b] BF(mu_a>mu_b:mu_a > > > cleanEx() > nameEx("print_coef.circGLM") > ### * print_coef.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: print_coef.circGLM > ### Title: Print circGLM coefficients > ### Aliases: print_coef.circGLM > > ### ** Examples > > print(circGLM(th = rvmc(10, 0, 1)), type = "coef") Estimate SD LB UB Intercept 0.186 0.400 -0.596 1.001 Kappa 1.408 0.721 0.282 3.031 > > dat <- generateCircGLMData() > cglmmod <- circGLM(th = dat[, 1], X = dat[, -1]) > print(cglmmod, type = "coef") Estimate SD LB UB Intercept 1.621 0.215 1.183 2.026 Kappa 3.089 0.984 1.762 5.506 l1 0.293 0.071 0.161 0.446 l2 0.147 0.066 0.010 0.287 c1 0.819 0.254 0.327 1.301 c2 0.948 0.209 0.562 1.324 > > > > cleanEx() > nameEx("print_mcmc.circGLM") > ### * print_mcmc.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: print_mcmc.circGLM > ### Title: Print the mcmc results from a circGLM object > ### Aliases: print_mcmc.circGLM > > ### ** Examples > > print(circGLM(th = rvmc(10, 1, 1)), type = "mcmc", digits = 3) Iterations = 0:999 Thinning interval = 1 Number of chains = 1 Sample size per chain = 1000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE b0_chain 1.19 0.400 0.0126 0.0126 kp_chain 1.54 0.721 0.0228 0.0248 mu_chain 1.19 0.400 0.0126 0.0126 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% b0_chain 0.415 0.965 1.19 1.40 2.00 kp_chain 0.354 1.026 1.46 1.96 3.13 mu_chain 0.415 0.965 1.19 1.40 2.00 > > dat <- generateCircGLMData() > cglmmod <- circGLM(th = dat[, 1], X = dat[, -1]) > print(cglmmod, type = "mcmc") Iterations = 0:999 Thinning interval = 1 Number of chains = 1 Sample size per chain = 1000 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Mean SD Naive SE Time-series SE b0_chain 1.62073 0.21531 0.006809 0.035512 kp_chain 3.58847 0.98371 0.031108 0.038382 bt_chain.1 0.29322 0.07072 0.002236 0.008182 bt_chain.2 0.14700 0.06630 0.002097 0.008893 dt_chain.1 0.81931 0.25415 0.008037 0.044970 dt_chain.2 0.94806 0.20873 0.006601 0.034910 zt_chain.1 0.18080 0.04127 0.001305 0.004763 zt_chain.2 0.09251 0.04098 0.001296 0.005493 mu_chain.Reference 1.62073 0.21531 0.006809 0.035512 mu_chain.c1 2.44004 0.20020 0.006331 0.024705 mu_chain.c2 2.56879 0.15651 0.004949 0.017144 2. Quantiles for each variable: 2.5% 25% 50% 75% 97.5% b0_chain 1.185957 1.47216 1.62643 1.7768 2.0257 kp_chain 1.900448 2.86985 3.49707 4.2031 5.7436 bt_chain.1 0.161478 0.24775 0.28967 0.3385 0.4462 bt_chain.2 0.010815 0.10896 0.14572 0.1866 0.2867 dt_chain.1 0.327714 0.65400 0.81553 0.9972 1.3014 dt_chain.2 0.561832 0.80165 0.94526 1.0852 1.3241 zt_chain.1 0.101920 0.15461 0.17950 0.2078 0.2672 zt_chain.2 0.006884 0.06909 0.09212 0.1174 0.1778 mu_chain.Reference 1.185957 1.47216 1.62643 1.7768 2.0257 mu_chain.c1 2.046727 2.29902 2.43847 2.5785 2.8355 mu_chain.c2 2.251253 2.47067 2.57267 2.6717 2.8671 > > > > cleanEx() > nameEx("print_text.circGLM") > ### * print_text.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: print_text.circGLM > ### Title: Print the main results from a 'circGLM' object. > ### Aliases: print_text.circGLM > > ### ** Examples > > print(circGLM(th = rvmc(10, 1, 1)), type = "text") Bayesian circular GLM Call: circGLM(th = rvmc(10, 1, 1)) MCMC run for 1000 its, 1000 used. Coefficients: Estimate SD LB UB Intercept 1.186 0.400 0.404 2.001 Kappa 1.408 0.721 0.282 3.031 DIC: 33.033 WAIC: 32.85 > > dat <- generateCircGLMData() > cglmmod <- circGLM(th = dat[, 1], X = dat[, -1]) > print(cglmmod, type = "text") Bayesian circular GLM Call: circGLM(th = dat[, 1], X = dat[, -1]) MCMC run for 1000 its, 1000 used. Coefficients: Estimate SD LB UB Intercept 1.621 0.215 1.183 2.026 Kappa 3.089 0.984 1.762 5.506 l1 0.293 0.071 0.161 0.446 l2 0.147 0.066 0.010 0.287 c1 0.819 0.254 0.327 1.301 c2 0.948 0.209 0.562 1.324 DIC: 60.902 WAIC: 60.36 > > > > cleanEx() > nameEx("residuals.circGLM") > ### * residuals.circGLM > > flush(stderr()); flush(stdout()) > > ### Name: residuals.circGLM > ### Title: Obtain residuals from a circGLM object > ### Aliases: residuals.circGLM > > ### ** Examples > > m <- circGLM(th = rvmc(10, 0, 1)) > residuals(m) [,1] [1,] 0.2377636 [2,] 2.3745233 [3,] 0.2808314 [4,] 1.2874381 [5,] 0.7125932 [6,] 0.4516249 [7,] 0.5195333 [8,] 0.6133420 [9,] 0.8289552 [10,] 1.0473453 > > # Cosine residuals > residuals(m, type = "cosine") [,1] [1,] 0.02813286 [2,] 1.71994770 [3,] 0.03917465 [4,] 0.72041845 [5,] 0.24333098 [6,] 0.10026085 [7,] 0.13194903 [8,] 0.18227110 [9,] 0.32435364 [10,] 0.50012799 > > > > > ### *