Let’s generate some Poisson data. I generate two data sets. yNL~this data set will does not have a Link function. This is to illustrate what happens if we try to recapture this data without using a link function. yL~this data set does use a Link function.

nReps<-10
x<-seq(from=0,to=100,by=1)
x<-rep(x,nReps)

b0<-1.0; b1<-0.2
myLM1<-b0+b1*x
yNL<-rpois(n=length(myLM),lambda=myLM) # No link function

b0<-1.0; b1<-0.02
myLM2<-b0+b1*x
myLambda<-exp(myLM2)
yL<-rpois(n=length(myLambda),lambda=myLambda) # Link function
myData<-data.frame(x,yL,yNL)

rm(x,y)
Warning: object 'y' not found
plot(myData$x,myData$yL)

plot(myData$x,myData$yNL)

First, let’s create a likelihood function that will be used for recapturing the simulation parameters. Note that there is parameter called ‘ifLink’. If its TRUE then it will recapture the parameters for the data generated using the Link function and if FALSE then it will recapture the parameters for the data generated without the Link function.

nlikPoisReg<-function(pars,data,ifLink=TRUE){
  
    a<-pars[1]      #intercept
    b<-pars[2]      #slope
    x<-data$x
    if(ifLink==TRUE){
      myLambda<-exp(a + b*x) # using log link
      y<-data$yL
    } else {
      myLambda<-a + b*x  # no link function
      y<-data$yNL
    }
    
    nlogLikelihood<- -sum(dpois(x=y,lambda = myLambda, log=TRUE))
    return(nlogLikelihood)
}

Trying to capture the parameters when ifLink = TRUE

parVec<-c(0.1,0.1) # Initial parameter values 
outLogReg<-optim(par=parVec,fn=nlikPoisReg,method="L-BFGS-B",lower=-Inf,upper=Inf,data=myData,ifLink=TRUE)
outLogReg$par
[1] 1.00907536 0.01987471

Trying to capture the parameters when ifLink = FALSE

parVec<-c(0.1,0.1) # Initial parameter values 
outLogReg<-optim(par=parVec,fn=nlikPoisReg,method="L-BFGS-B",lower=-Inf,upper=Inf,data=myData,ifLink=FALSE)
outLogReg$par
[1] 1.0868035 0.1963841

Now, trying to fit these models using ULAM from the Rethinking package. First loading rethinking.

library(rethinking)

Writing our first ULAM function. This function uses the yNL data so it is trying to recapture the parameters using data generated without using the Link function.

bayes_PoissonRegNoLink <- ulam(
alist(
yNL ~ dpois( lambda = myLambda ) ,
myLambda <- b0 + b1 * x ,
b0 ~ dnorm( 0 , 5 ) ,
b1 ~ dnorm( 0 , 5 ) 

) , data = myData, chains = 1, log_lik = FALSE)
Compiling Stan program...

-

\

|

/

-

\

|

/

-

\

|

/

-
In file included from /var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.hpp:1:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/rev.hpp:10:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/rev/fun.hpp:198:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/prim/functor.hpp:14:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:76:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/integrate/observer_collection.hpp:23:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/function.hpp:30:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/function/detail/prologue.hpp:17:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/function/function_base.hpp:21:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/type_index.hpp:29:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/type_index/stl_type_index.hpp:47:
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:132:33: warni

\
ng: 'unary_function<const std::error_category *, unsigned long>' is deprecated [-Wdeprecated-declarations]
        struct hash_base : std::unary_function<T, std::size_t> {};
                                ^
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:692:18: note: in instantiation of template class 'boost::hash_detail::hash_base<const std::error_category *>' requested here
        : public boost::hash_detail::hash_base<T*>
                 ^
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:420:24: note: in instantiation of template class 'boost::hash<const std::error_category *>' requested here
        boost::hash<T> hasher;
                       ^
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:551:9: note: in instantiation of function template specialization 'boost::hash_combine<const std::error_category *>' requested here
        hash_combine(seed, &v.category());
        ^

|
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/unary_function.h:23:29: note: 'unary_function<const std::error_category *, unsigned long>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function
                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:825:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^

/

-

\

|

/

-

\

|
1 warning generated.

/

-

\

|

 
Running MCMC with 1 chain, with 1 thread(s) per chain...

Chain 1 Iteration:   1 / 1000 [  0%]  (Warmup) 
Chain 1 Iteration: 100 / 1000 [ 10%]  (Warmup) 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -278.786, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -280.654, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -70.5148, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -17.3413, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -4.20049, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -1.04253, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -0.176432, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[2] is -3.63295, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[2] is -0.269645, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[2] is -0.153551, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -3572.37, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -24.812, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -0.00742159, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Iteration: 200 / 1000 [ 20%]  (Warmup) 
Chain 1 Iteration: 300 / 1000 [ 30%]  (Warmup) 
Chain 1 Iteration: 400 / 1000 [ 40%]  (Warmup) 
Chain 1 Iteration: 500 / 1000 [ 50%]  (Warmup) 
Chain 1 Iteration: 501 / 1000 [ 50%]  (Sampling) 
Chain 1 Iteration: 600 / 1000 [ 60%]  (Sampling) 
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: poisson_lpmf: Rate parameter[1] is -0.0135632, but must be nonnegative! (in '/var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba169fce55.stan', line 17, column 4 to column 30)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
Chain 1 
Chain 1 Iteration: 700 / 1000 [ 70%]  (Sampling) 
Chain 1 Iteration: 800 / 1000 [ 80%]  (Sampling) 
Chain 1 Iteration: 900 / 1000 [ 90%]  (Sampling) 
Chain 1 Iteration: 1000 / 1000 [100%]  (Sampling) 
Chain 1 finished in 0.3 seconds.

Examining the fit:

precis(bayes_PoissonRegNoLink)

Writing our second ULAM function. This function uses the yL data so it is trying to recapture the parameters using data generated with the Link function.

bayes_PoissonRegLink <- ulam(
alist(
yL ~ dpois( lambda = myLambda ) ,
log(myLambda) <- b0 + b1 * x ,
b0 ~ dnorm( 0 , 5 ) ,
b1 ~ dnorm( 0 , 5 ) 

) , data = myData, chains = 4,iter=10000, log_lik = TRUE)
Compiling Stan program...

-

\

|

/

-

\

|

/

-

\

|
In file included from /var/folders/4f/_h6ql5191cl7bc390kh2xd380000gn/T/RtmprOlWiG/model-133ba55949abd.hpp:1:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/rev.hpp:10:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/rev/fun.hpp:198:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/prim/functor.hpp:14:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:76:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/integrate/observer_collection.hpp:23:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/function.hpp:30:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/function/detail/prologue.hpp:17:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/function/function_base.hpp:21:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/type_index.hpp:29:
In file included from /Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/type_index/stl_type_index.hpp:47:
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:132:33: warni

/
ng: 'unary_function<const std::error_category *, unsigned long>' is deprecated [-Wdeprecated-declarations]
        struct hash_base : std::unary_function<T, std::size_t> {};
                                ^
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:692:18: note: in instantiation of template class 'boost::hash_detail::hash_base<const std::error_category *>' requested here
        : public boost::hash_detail::hash_base<T*>
                 ^
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:420:24: note: in instantiation of template class 'boost::hash<const std::error_category *>' requested here
        boost::hash<T> hasher;
                       ^
/Users/brianbeckage/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/boost_1.78.0/boost/container_hash/hash.hpp:551:9: note: in instantiation of function template specialization 'boost::hash_combine<const std::error_category *>' requested here
        hash_combine(seed, &v.category());
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/unary_function.h:23:29: note: 'unary_function<const std::error_category *, unsigned long>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function
                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:825:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^

-

\

|

/

-

\

|

/
1 warning generated.

-

\

|

/

 
Running MCMC with 4 sequential chains, with 1 thread(s) per chain...

Chain 1 Iteration:    1 / 10000 [  0%]  (Warmup) 
Chain 1 Iteration:  100 / 10000 [  1%]  (Warmup) 
Chain 1 Iteration:  200 / 10000 [  2%]  (Warmup) 
Chain 1 Iteration:  300 / 10000 [  3%]  (Warmup) 
Chain 1 Iteration:  400 / 10000 [  4%]  (Warmup) 
Chain 1 Iteration:  500 / 10000 [  5%]  (Warmup) 
Chain 1 Iteration:  600 / 10000 [  6%]  (Warmup) 
Chain 1 Iteration:  700 / 10000 [  7%]  (Warmup) 
Chain 1 Iteration:  800 / 10000 [  8%]  (Warmup) 
Chain 1 Iteration:  900 / 10000 [  9%]  (Warmup) 
Chain 1 Iteration: 1000 / 10000 [ 10%]  (Warmup) 
Chain 1 Iteration: 1100 / 10000 [ 11%]  (Warmup) 
Chain 1 Iteration: 1200 / 10000 [ 12%]  (Warmup) 
Chain 1 Iteration: 1300 / 10000 [ 13%]  (Warmup) 
Chain 1 Iteration: 1400 / 10000 [ 14%]  (Warmup) 
Chain 1 Iteration: 1500 / 10000 [ 15%]  (Warmup) 
Chain 1 Iteration: 1600 / 10000 [ 16%]  (Warmup) 
Chain 1 Iteration: 1700 / 10000 [ 17%]  (Warmup) 
Chain 1 Iteration: 1800 / 10000 [ 18%]  (Warmup) 
Chain 1 Iteration: 1900 / 10000 [ 19%]  (Warmup) 
Chain 1 Iteration: 2000 / 10000 [ 20%]  (Warmup) 
Chain 1 Iteration: 2100 / 10000 [ 21%]  (Warmup) 
Chain 1 Iteration: 2200 / 10000 [ 22%]  (Warmup) 
Chain 1 Iteration: 2300 / 10000 [ 23%]  (Warmup) 
Chain 1 Iteration: 2400 / 10000 [ 24%]  (Warmup) 
Chain 1 Iteration: 2500 / 10000 [ 25%]  (Warmup) 
Chain 1 Iteration: 2600 / 10000 [ 26%]  (Warmup) 
Chain 1 Iteration: 2700 / 10000 [ 27%]  (Warmup) 
Chain 1 Iteration: 2800 / 10000 [ 28%]  (Warmup) 
Chain 1 Iteration: 2900 / 10000 [ 29%]  (Warmup) 
Chain 1 Iteration: 3000 / 10000 [ 30%]  (Warmup) 
Chain 1 Iteration: 3100 / 10000 [ 31%]  (Warmup) 
Chain 1 Iteration: 3200 / 10000 [ 32%]  (Warmup) 
Chain 1 Iteration: 3300 / 10000 [ 33%]  (Warmup) 
Chain 1 Iteration: 3400 / 10000 [ 34%]  (Warmup) 
Chain 1 Iteration: 3500 / 10000 [ 35%]  (Warmup) 
Chain 1 Iteration: 3600 / 10000 [ 36%]  (Warmup) 
Chain 1 Iteration: 3700 / 10000 [ 37%]  (Warmup) 
Chain 1 Iteration: 3800 / 10000 [ 38%]  (Warmup) 
Chain 1 Iteration: 3900 / 10000 [ 39%]  (Warmup) 
Chain 1 Iteration: 4000 / 10000 [ 40%]  (Warmup) 
Chain 1 Iteration: 4100 / 10000 [ 41%]  (Warmup) 
Chain 1 Iteration: 4200 / 10000 [ 42%]  (Warmup) 
Chain 1 Iteration: 4300 / 10000 [ 43%]  (Warmup) 
Chain 1 Iteration: 4400 / 10000 [ 44%]  (Warmup) 
Chain 1 Iteration: 4500 / 10000 [ 45%]  (Warmup) 
Chain 1 Iteration: 4600 / 10000 [ 46%]  (Warmup) 
Chain 1 Iteration: 4700 / 10000 [ 47%]  (Warmup) 
Chain 1 Iteration: 4800 / 10000 [ 48%]  (Warmup) 
Chain 1 Iteration: 4900 / 10000 [ 49%]  (Warmup) 
Chain 1 Iteration: 5000 / 10000 [ 50%]  (Warmup) 
Chain 1 Iteration: 5001 / 10000 [ 50%]  (Sampling) 
Chain 1 Iteration: 5100 / 10000 [ 51%]  (Sampling) 
Chain 1 Iteration: 5200 / 10000 [ 52%]  (Sampling) 
Chain 1 Iteration: 5300 / 10000 [ 53%]  (Sampling) 
Chain 1 Iteration: 5400 / 10000 [ 54%]  (Sampling) 
Chain 1 Iteration: 5500 / 10000 [ 55%]  (Sampling) 
Chain 1 Iteration: 5600 / 10000 [ 56%]  (Sampling) 
Chain 1 Iteration: 5700 / 10000 [ 57%]  (Sampling) 
Chain 1 Iteration: 5800 / 10000 [ 58%]  (Sampling) 
Chain 1 Iteration: 5900 / 10000 [ 59%]  (Sampling) 
Chain 1 Iteration: 6000 / 10000 [ 60%]  (Sampling) 
Chain 1 Iteration: 6100 / 10000 [ 61%]  (Sampling) 
Chain 1 Iteration: 6200 / 10000 [ 62%]  (Sampling) 
Chain 1 Iteration: 6300 / 10000 [ 63%]  (Sampling) 
Chain 1 Iteration: 6400 / 10000 [ 64%]  (Sampling) 
Chain 1 Iteration: 6500 / 10000 [ 65%]  (Sampling) 
Chain 1 Iteration: 6600 / 10000 [ 66%]  (Sampling) 
Chain 1 Iteration: 6700 / 10000 [ 67%]  (Sampling) 
Chain 1 Iteration: 6800 / 10000 [ 68%]  (Sampling) 
Chain 1 Iteration: 6900 / 10000 [ 69%]  (Sampling) 
Chain 1 Iteration: 7000 / 10000 [ 70%]  (Sampling) 
Chain 1 Iteration: 7100 / 10000 [ 71%]  (Sampling) 
Chain 1 Iteration: 7200 / 10000 [ 72%]  (Sampling) 
Chain 1 Iteration: 7300 / 10000 [ 73%]  (Sampling) 
Chain 1 Iteration: 7400 / 10000 [ 74%]  (Sampling) 
Chain 1 Iteration: 7500 / 10000 [ 75%]  (Sampling) 
Chain 1 Iteration: 7600 / 10000 [ 76%]  (Sampling) 
Chain 1 Iteration: 7700 / 10000 [ 77%]  (Sampling) 
Chain 1 Iteration: 7800 / 10000 [ 78%]  (Sampling) 
Chain 1 Iteration: 7900 / 10000 [ 79%]  (Sampling) 
Chain 1 Iteration: 8000 / 10000 [ 80%]  (Sampling) 
Chain 1 Iteration: 8100 / 10000 [ 81%]  (Sampling) 
Chain 1 Iteration: 8200 / 10000 [ 82%]  (Sampling) 
Chain 1 Iteration: 8300 / 10000 [ 83%]  (Sampling) 
Chain 1 Iteration: 8400 / 10000 [ 84%]  (Sampling) 
Chain 1 Iteration: 8500 / 10000 [ 85%]  (Sampling) 
Chain 1 Iteration: 8600 / 10000 [ 86%]  (Sampling) 
Chain 1 Iteration: 8700 / 10000 [ 87%]  (Sampling) 
Chain 1 Iteration: 8800 / 10000 [ 88%]  (Sampling) 
Chain 1 Iteration: 8900 / 10000 [ 89%]  (Sampling) 
Chain 1 Iteration: 9000 / 10000 [ 90%]  (Sampling) 
Chain 1 Iteration: 9100 / 10000 [ 91%]  (Sampling) 
Chain 1 Iteration: 9200 / 10000 [ 92%]  (Sampling) 
Chain 1 Iteration: 9300 / 10000 [ 93%]  (Sampling) 
Chain 1 Iteration: 9400 / 10000 [ 94%]  (Sampling) 
Chain 1 Iteration: 9500 / 10000 [ 95%]  (Sampling) 
Chain 1 Iteration: 9600 / 10000 [ 96%]  (Sampling) 
Chain 1 Iteration: 9700 / 10000 [ 97%]  (Sampling) 
Chain 1 Iteration: 9800 / 10000 [ 98%]  (Sampling) 
Chain 1 Iteration: 9900 / 10000 [ 99%]  (Sampling) 
Chain 1 Iteration: 10000 / 10000 [100%]  (Sampling) 
Chain 1 finished in 10.1 seconds.
Chain 2 Iteration:    1 / 10000 [  0%]  (Warmup) 
Chain 2 Iteration:  100 / 10000 [  1%]  (Warmup) 
Chain 2 Iteration:  200 / 10000 [  2%]  (Warmup) 
Chain 2 Iteration:  300 / 10000 [  3%]  (Warmup) 
Chain 2 Iteration:  400 / 10000 [  4%]  (Warmup) 
Chain 2 Iteration:  500 / 10000 [  5%]  (Warmup) 
Chain 2 Iteration:  600 / 10000 [  6%]  (Warmup) 
Chain 2 Iteration:  700 / 10000 [  7%]  (Warmup) 
Chain 2 Iteration:  800 / 10000 [  8%]  (Warmup) 
Chain 2 Iteration:  900 / 10000 [  9%]  (Warmup) 
Chain 2 Iteration: 1000 / 10000 [ 10%]  (Warmup) 
Chain 2 Iteration: 1100 / 10000 [ 11%]  (Warmup) 
Chain 2 Iteration: 1200 / 10000 [ 12%]  (Warmup) 
Chain 2 Iteration: 1300 / 10000 [ 13%]  (Warmup) 
Chain 2 Iteration: 1400 / 10000 [ 14%]  (Warmup) 
Chain 2 Iteration: 1500 / 10000 [ 15%]  (Warmup) 
Chain 2 Iteration: 1600 / 10000 [ 16%]  (Warmup) 
Chain 2 Iteration: 1700 / 10000 [ 17%]  (Warmup) 
Chain 2 Iteration: 1800 / 10000 [ 18%]  (Warmup) 
Chain 2 Iteration: 1900 / 10000 [ 19%]  (Warmup) 
Chain 2 Iteration: 2000 / 10000 [ 20%]  (Warmup) 
Chain 2 Iteration: 2100 / 10000 [ 21%]  (Warmup) 
Chain 2 Iteration: 2200 / 10000 [ 22%]  (Warmup) 
Chain 2 Iteration: 2300 / 10000 [ 23%]  (Warmup) 
Chain 2 Iteration: 2400 / 10000 [ 24%]  (Warmup) 
Chain 2 Iteration: 2500 / 10000 [ 25%]  (Warmup) 
Chain 2 Iteration: 2600 / 10000 [ 26%]  (Warmup) 
Chain 2 Iteration: 2700 / 10000 [ 27%]  (Warmup) 
Chain 2 Iteration: 2800 / 10000 [ 28%]  (Warmup) 
Chain 2 Iteration: 2900 / 10000 [ 29%]  (Warmup) 
Chain 2 Iteration: 3000 / 10000 [ 30%]  (Warmup) 
Chain 2 Iteration: 3100 / 10000 [ 31%]  (Warmup) 
Chain 2 Iteration: 3200 / 10000 [ 32%]  (Warmup) 
Chain 2 Iteration: 3300 / 10000 [ 33%]  (Warmup) 
Chain 2 Iteration: 3400 / 10000 [ 34%]  (Warmup) 
Chain 2 Iteration: 3500 / 10000 [ 35%]  (Warmup) 
Chain 2 Iteration: 3600 / 10000 [ 36%]  (Warmup) 
Chain 2 Iteration: 3700 / 10000 [ 37%]  (Warmup) 
Chain 2 Iteration: 3800 / 10000 [ 38%]  (Warmup) 
Chain 2 Iteration: 3900 / 10000 [ 39%]  (Warmup) 
Chain 2 Iteration: 4000 / 10000 [ 40%]  (Warmup) 
Chain 2 Iteration: 4100 / 10000 [ 41%]  (Warmup) 
Chain 2 Iteration: 4200 / 10000 [ 42%]  (Warmup) 
Chain 2 Iteration: 4300 / 10000 [ 43%]  (Warmup) 
Chain 2 Iteration: 4400 / 10000 [ 44%]  (Warmup) 
Chain 2 Iteration: 4500 / 10000 [ 45%]  (Warmup) 
Chain 2 Iteration: 4600 / 10000 [ 46%]  (Warmup) 
Chain 2 Iteration: 4700 / 10000 [ 47%]  (Warmup) 
Chain 2 Iteration: 4800 / 10000 [ 48%]  (Warmup) 
Chain 2 Iteration: 4900 / 10000 [ 49%]  (Warmup) 
Chain 2 Iteration: 5000 / 10000 [ 50%]  (Warmup) 
Chain 2 Iteration: 5001 / 10000 [ 50%]  (Sampling) 
Chain 2 Iteration: 5100 / 10000 [ 51%]  (Sampling) 
Chain 2 Iteration: 5200 / 10000 [ 52%]  (Sampling) 
Chain 2 Iteration: 5300 / 10000 [ 53%]  (Sampling) 
Chain 2 Iteration: 5400 / 10000 [ 54%]  (Sampling) 
Chain 2 Iteration: 5500 / 10000 [ 55%]  (Sampling) 
Chain 2 Iteration: 5600 / 10000 [ 56%]  (Sampling) 
Chain 2 Iteration: 5700 / 10000 [ 57%]  (Sampling) 
Chain 2 Iteration: 5800 / 10000 [ 58%]  (Sampling) 
Chain 2 Iteration: 5900 / 10000 [ 59%]  (Sampling) 
Chain 2 Iteration: 6000 / 10000 [ 60%]  (Sampling) 
Chain 2 Iteration: 6100 / 10000 [ 61%]  (Sampling) 
Chain 2 Iteration: 6200 / 10000 [ 62%]  (Sampling) 
Chain 2 Iteration: 6300 / 10000 [ 63%]  (Sampling) 
Chain 2 Iteration: 6400 / 10000 [ 64%]  (Sampling) 
Chain 2 Iteration: 6500 / 10000 [ 65%]  (Sampling) 
Chain 2 Iteration: 6600 / 10000 [ 66%]  (Sampling) 
Chain 2 Iteration: 6700 / 10000 [ 67%]  (Sampling) 
Chain 2 Iteration: 6800 / 10000 [ 68%]  (Sampling) 
Chain 2 Iteration: 6900 / 10000 [ 69%]  (Sampling) 
Chain 2 Iteration: 7000 / 10000 [ 70%]  (Sampling) 
Chain 2 Iteration: 7100 / 10000 [ 71%]  (Sampling) 
Chain 2 Iteration: 7200 / 10000 [ 72%]  (Sampling) 
Chain 2 Iteration: 7300 / 10000 [ 73%]  (Sampling) 
Chain 2 Iteration: 7400 / 10000 [ 74%]  (Sampling) 
Chain 2 Iteration: 7500 / 10000 [ 75%]  (Sampling) 
Chain 2 Iteration: 7600 / 10000 [ 76%]  (Sampling) 
Chain 2 Iteration: 7700 / 10000 [ 77%]  (Sampling) 
Chain 2 Iteration: 7800 / 10000 [ 78%]  (Sampling) 
Chain 2 Iteration: 7900 / 10000 [ 79%]  (Sampling) 
Chain 2 Iteration: 8000 / 10000 [ 80%]  (Sampling) 
Chain 2 Iteration: 8100 / 10000 [ 81%]  (Sampling) 
Chain 2 Iteration: 8200 / 10000 [ 82%]  (Sampling) 
Chain 2 Iteration: 8300 / 10000 [ 83%]  (Sampling) 
Chain 2 Iteration: 8400 / 10000 [ 84%]  (Sampling) 
Chain 2 Iteration: 8500 / 10000 [ 85%]  (Sampling) 
Chain 2 Iteration: 8600 / 10000 [ 86%]  (Sampling) 
Chain 2 Iteration: 8700 / 10000 [ 87%]  (Sampling) 
Chain 2 Iteration: 8800 / 10000 [ 88%]  (Sampling) 
Chain 2 Iteration: 8900 / 10000 [ 89%]  (Sampling) 
Chain 2 Iteration: 9000 / 10000 [ 90%]  (Sampling) 
Chain 2 Iteration: 9100 / 10000 [ 91%]  (Sampling) 
Chain 2 Iteration: 9200 / 10000 [ 92%]  (Sampling) 
Chain 2 Iteration: 9300 / 10000 [ 93%]  (Sampling) 
Chain 2 Iteration: 9400 / 10000 [ 94%]  (Sampling) 
Chain 2 Iteration: 9500 / 10000 [ 95%]  (Sampling) 
Chain 2 Iteration: 9600 / 10000 [ 96%]  (Sampling) 
Chain 2 Iteration: 9700 / 10000 [ 97%]  (Sampling) 
Chain 2 Iteration: 9800 / 10000 [ 98%]  (Sampling) 
Chain 2 Iteration: 9900 / 10000 [ 99%]  (Sampling) 
Chain 2 Iteration: 10000 / 10000 [100%]  (Sampling) 
Chain 2 finished in 9.6 seconds.
Chain 3 Iteration:    1 / 10000 [  0%]  (Warmup) 
Chain 3 Iteration:  100 / 10000 [  1%]  (Warmup) 
Chain 3 Iteration:  200 / 10000 [  2%]  (Warmup) 
Chain 3 Iteration:  300 / 10000 [  3%]  (Warmup) 
Chain 3 Iteration:  400 / 10000 [  4%]  (Warmup) 
Chain 3 Iteration:  500 / 10000 [  5%]  (Warmup) 
Chain 3 Iteration:  600 / 10000 [  6%]  (Warmup) 
Chain 3 Iteration:  700 / 10000 [  7%]  (Warmup) 
Chain 3 Iteration:  800 / 10000 [  8%]  (Warmup) 
Chain 3 Iteration:  900 / 10000 [  9%]  (Warmup) 
Chain 3 Iteration: 1000 / 10000 [ 10%]  (Warmup) 
Chain 3 Iteration: 1100 / 10000 [ 11%]  (Warmup) 
Chain 3 Iteration: 1200 / 10000 [ 12%]  (Warmup) 
Chain 3 Iteration: 1300 / 10000 [ 13%]  (Warmup) 
Chain 3 Iteration: 1400 / 10000 [ 14%]  (Warmup) 
Chain 3 Iteration: 1500 / 10000 [ 15%]  (Warmup) 
Chain 3 Iteration: 1600 / 10000 [ 16%]  (Warmup) 
Chain 3 Iteration: 1700 / 10000 [ 17%]  (Warmup) 
Chain 3 Iteration: 1800 / 10000 [ 18%]  (Warmup) 
Chain 3 Iteration: 1900 / 10000 [ 19%]  (Warmup) 
Chain 3 Iteration: 2000 / 10000 [ 20%]  (Warmup) 
Chain 3 Iteration: 2100 / 10000 [ 21%]  (Warmup) 
Chain 3 Iteration: 2200 / 10000 [ 22%]  (Warmup) 
Chain 3 Iteration: 2300 / 10000 [ 23%]  (Warmup) 
Chain 3 Iteration: 2400 / 10000 [ 24%]  (Warmup) 
Chain 3 Iteration: 2500 / 10000 [ 25%]  (Warmup) 
Chain 3 Iteration: 2600 / 10000 [ 26%]  (Warmup) 
Chain 3 Iteration: 2700 / 10000 [ 27%]  (Warmup) 
Chain 3 Iteration: 2800 / 10000 [ 28%]  (Warmup) 
Chain 3 Iteration: 2900 / 10000 [ 29%]  (Warmup) 
Chain 3 Iteration: 3000 / 10000 [ 30%]  (Warmup) 
Chain 3 Iteration: 3100 / 10000 [ 31%]  (Warmup) 
Chain 3 Iteration: 3200 / 10000 [ 32%]  (Warmup) 
Chain 3 Iteration: 3300 / 10000 [ 33%]  (Warmup) 
Chain 3 Iteration: 3400 / 10000 [ 34%]  (Warmup) 
Chain 3 Iteration: 3500 / 10000 [ 35%]  (Warmup) 
Chain 3 Iteration: 3600 / 10000 [ 36%]  (Warmup) 
Chain 3 Iteration: 3700 / 10000 [ 37%]  (Warmup) 
Chain 3 Iteration: 3800 / 10000 [ 38%]  (Warmup) 
Chain 3 Iteration: 3900 / 10000 [ 39%]  (Warmup) 
Chain 3 Iteration: 4000 / 10000 [ 40%]  (Warmup) 
Chain 3 Iteration: 4100 / 10000 [ 41%]  (Warmup) 
Chain 3 Iteration: 4200 / 10000 [ 42%]  (Warmup) 
Chain 3 Iteration: 4300 / 10000 [ 43%]  (Warmup) 
Chain 3 Iteration: 4400 / 10000 [ 44%]  (Warmup) 
Chain 3 Iteration: 4500 / 10000 [ 45%]  (Warmup) 
Chain 3 Iteration: 4600 / 10000 [ 46%]  (Warmup) 
Chain 3 Iteration: 4700 / 10000 [ 47%]  (Warmup) 
Chain 3 Iteration: 4800 / 10000 [ 48%]  (Warmup) 
Chain 3 Iteration: 4900 / 10000 [ 49%]  (Warmup) 
Chain 3 Iteration: 5000 / 10000 [ 50%]  (Warmup) 
Chain 3 Iteration: 5001 / 10000 [ 50%]  (Sampling) 
Chain 3 Iteration: 5100 / 10000 [ 51%]  (Sampling) 
Chain 3 Iteration: 5200 / 10000 [ 52%]  (Sampling) 
Chain 3 Iteration: 5300 / 10000 [ 53%]  (Sampling) 
Chain 3 Iteration: 5400 / 10000 [ 54%]  (Sampling) 
Chain 3 Iteration: 5500 / 10000 [ 55%]  (Sampling) 
Chain 3 Iteration: 5600 / 10000 [ 56%]  (Sampling) 
Chain 3 Iteration: 5700 / 10000 [ 57%]  (Sampling) 
Chain 3 Iteration: 5800 / 10000 [ 58%]  (Sampling) 
Chain 3 Iteration: 5900 / 10000 [ 59%]  (Sampling) 
Chain 3 Iteration: 6000 / 10000 [ 60%]  (Sampling) 
Chain 3 Iteration: 6100 / 10000 [ 61%]  (Sampling) 
Chain 3 Iteration: 6200 / 10000 [ 62%]  (Sampling) 
Chain 3 Iteration: 6300 / 10000 [ 63%]  (Sampling) 
Chain 3 Iteration: 6400 / 10000 [ 64%]  (Sampling) 
Chain 3 Iteration: 6500 / 10000 [ 65%]  (Sampling) 
Chain 3 Iteration: 6600 / 10000 [ 66%]  (Sampling) 
Chain 3 Iteration: 6700 / 10000 [ 67%]  (Sampling) 
Chain 3 Iteration: 6800 / 10000 [ 68%]  (Sampling) 
Chain 3 Iteration: 6900 / 10000 [ 69%]  (Sampling) 
Chain 3 Iteration: 7000 / 10000 [ 70%]  (Sampling) 
Chain 3 Iteration: 7100 / 10000 [ 71%]  (Sampling) 
Chain 3 Iteration: 7200 / 10000 [ 72%]  (Sampling) 
Chain 3 Iteration: 7300 / 10000 [ 73%]  (Sampling) 
Chain 3 Iteration: 7400 / 10000 [ 74%]  (Sampling) 
Chain 3 Iteration: 7500 / 10000 [ 75%]  (Sampling) 
Chain 3 Iteration: 7600 / 10000 [ 76%]  (Sampling) 
Chain 3 Iteration: 7700 / 10000 [ 77%]  (Sampling) 
Chain 3 Iteration: 7800 / 10000 [ 78%]  (Sampling) 
Chain 3 Iteration: 7900 / 10000 [ 79%]  (Sampling) 
Chain 3 Iteration: 8000 / 10000 [ 80%]  (Sampling) 
Chain 3 Iteration: 8100 / 10000 [ 81%]  (Sampling) 
Chain 3 Iteration: 8200 / 10000 [ 82%]  (Sampling) 
Chain 3 Iteration: 8300 / 10000 [ 83%]  (Sampling) 
Chain 3 Iteration: 8400 / 10000 [ 84%]  (Sampling) 
Chain 3 Iteration: 8500 / 10000 [ 85%]  (Sampling) 
Chain 3 Iteration: 8600 / 10000 [ 86%]  (Sampling) 
Chain 3 Iteration: 8700 / 10000 [ 87%]  (Sampling) 
Chain 3 Iteration: 8800 / 10000 [ 88%]  (Sampling) 
Chain 3 Iteration: 8900 / 10000 [ 89%]  (Sampling) 
Chain 3 Iteration: 9000 / 10000 [ 90%]  (Sampling) 
Chain 3 Iteration: 9100 / 10000 [ 91%]  (Sampling) 
Chain 3 Iteration: 9200 / 10000 [ 92%]  (Sampling) 
Chain 3 Iteration: 9300 / 10000 [ 93%]  (Sampling) 
Chain 3 Iteration: 9400 / 10000 [ 94%]  (Sampling) 
Chain 3 Iteration: 9500 / 10000 [ 95%]  (Sampling) 
Chain 3 Iteration: 9600 / 10000 [ 96%]  (Sampling) 
Chain 3 Iteration: 9700 / 10000 [ 97%]  (Sampling) 
Chain 3 Iteration: 9800 / 10000 [ 98%]  (Sampling) 
Chain 3 Iteration: 9900 / 10000 [ 99%]  (Sampling) 
Chain 3 Iteration: 10000 / 10000 [100%]  (Sampling) 
Chain 3 finished in 12.8 seconds.
Chain 4 Iteration:    1 / 10000 [  0%]  (Warmup) 
Chain 4 Iteration:  100 / 10000 [  1%]  (Warmup) 
Chain 4 Iteration:  200 / 10000 [  2%]  (Warmup) 
Chain 4 Iteration:  300 / 10000 [  3%]  (Warmup) 
Chain 4 Iteration:  400 / 10000 [  4%]  (Warmup) 
Chain 4 Iteration:  500 / 10000 [  5%]  (Warmup) 
Chain 4 Iteration:  600 / 10000 [  6%]  (Warmup) 
Chain 4 Iteration:  700 / 10000 [  7%]  (Warmup) 
Chain 4 Iteration:  800 / 10000 [  8%]  (Warmup) 
Chain 4 Iteration:  900 / 10000 [  9%]  (Warmup) 
Chain 4 Iteration: 1000 / 10000 [ 10%]  (Warmup) 
Chain 4 Iteration: 1100 / 10000 [ 11%]  (Warmup) 
Chain 4 Iteration: 1200 / 10000 [ 12%]  (Warmup) 
Chain 4 Iteration: 1300 / 10000 [ 13%]  (Warmup) 
Chain 4 Iteration: 1400 / 10000 [ 14%]  (Warmup) 
Chain 4 Iteration: 1500 / 10000 [ 15%]  (Warmup) 
Chain 4 Iteration: 1600 / 10000 [ 16%]  (Warmup) 
Chain 4 Iteration: 1700 / 10000 [ 17%]  (Warmup) 
Chain 4 Iteration: 1800 / 10000 [ 18%]  (Warmup) 
Chain 4 Iteration: 1900 / 10000 [ 19%]  (Warmup) 
Chain 4 Iteration: 2000 / 10000 [ 20%]  (Warmup) 
Chain 4 Iteration: 2100 / 10000 [ 21%]  (Warmup) 
Chain 4 Iteration: 2200 / 10000 [ 22%]  (Warmup) 
Chain 4 Iteration: 2300 / 10000 [ 23%]  (Warmup) 
Chain 4 Iteration: 2400 / 10000 [ 24%]  (Warmup) 
Chain 4 Iteration: 2500 / 10000 [ 25%]  (Warmup) 
Chain 4 Iteration: 2600 / 10000 [ 26%]  (Warmup) 
Chain 4 Iteration: 2700 / 10000 [ 27%]  (Warmup) 
Chain 4 Iteration: 2800 / 10000 [ 28%]  (Warmup) 
Chain 4 Iteration: 2900 / 10000 [ 29%]  (Warmup) 
Chain 4 Iteration: 3000 / 10000 [ 30%]  (Warmup) 
Chain 4 Iteration: 3100 / 10000 [ 31%]  (Warmup) 
Chain 4 Iteration: 3200 / 10000 [ 32%]  (Warmup) 
Chain 4 Iteration: 3300 / 10000 [ 33%]  (Warmup) 
Chain 4 Iteration: 3400 / 10000 [ 34%]  (Warmup) 
Chain 4 Iteration: 3500 / 10000 [ 35%]  (Warmup) 
Chain 4 Iteration: 3600 / 10000 [ 36%]  (Warmup) 
Chain 4 Iteration: 3700 / 10000 [ 37%]  (Warmup) 
Chain 4 Iteration: 3800 / 10000 [ 38%]  (Warmup) 
Chain 4 Iteration: 3900 / 10000 [ 39%]  (Warmup) 
Chain 4 Iteration: 4000 / 10000 [ 40%]  (Warmup) 
Chain 4 Iteration: 4100 / 10000 [ 41%]  (Warmup) 
Chain 4 Iteration: 4200 / 10000 [ 42%]  (Warmup) 
Chain 4 Iteration: 4300 / 10000 [ 43%]  (Warmup) 
Chain 4 Iteration: 4400 / 10000 [ 44%]  (Warmup) 
Chain 4 Iteration: 4500 / 10000 [ 45%]  (Warmup) 
Chain 4 Iteration: 4600 / 10000 [ 46%]  (Warmup) 
Chain 4 Iteration: 4700 / 10000 [ 47%]  (Warmup) 
Chain 4 Iteration: 4800 / 10000 [ 48%]  (Warmup) 
Chain 4 Iteration: 4900 / 10000 [ 49%]  (Warmup) 
Chain 4 Iteration: 5000 / 10000 [ 50%]  (Warmup) 
Chain 4 Iteration: 5001 / 10000 [ 50%]  (Sampling) 
Chain 4 Iteration: 5100 / 10000 [ 51%]  (Sampling) 
Chain 4 Iteration: 5200 / 10000 [ 52%]  (Sampling) 
Chain 4 Iteration: 5300 / 10000 [ 53%]  (Sampling) 
Chain 4 Iteration: 5400 / 10000 [ 54%]  (Sampling) 
Chain 4 Iteration: 5500 / 10000 [ 55%]  (Sampling) 
Chain 4 Iteration: 5600 / 10000 [ 56%]  (Sampling) 
Chain 4 Iteration: 5700 / 10000 [ 57%]  (Sampling) 
Chain 4 Iteration: 5800 / 10000 [ 58%]  (Sampling) 
Chain 4 Iteration: 5900 / 10000 [ 59%]  (Sampling) 
Chain 4 Iteration: 6000 / 10000 [ 60%]  (Sampling) 
Chain 4 Iteration: 6100 / 10000 [ 61%]  (Sampling) 
Chain 4 Iteration: 6200 / 10000 [ 62%]  (Sampling) 
Chain 4 Iteration: 6300 / 10000 [ 63%]  (Sampling) 
Chain 4 Iteration: 6400 / 10000 [ 64%]  (Sampling) 
Chain 4 Iteration: 6500 / 10000 [ 65%]  (Sampling) 
Chain 4 Iteration: 6600 / 10000 [ 66%]  (Sampling) 
Chain 4 Iteration: 6700 / 10000 [ 67%]  (Sampling) 
Chain 4 Iteration: 6800 / 10000 [ 68%]  (Sampling) 
Chain 4 Iteration: 6900 / 10000 [ 69%]  (Sampling) 
Chain 4 Iteration: 7000 / 10000 [ 70%]  (Sampling) 
Chain 4 Iteration: 7100 / 10000 [ 71%]  (Sampling) 
Chain 4 Iteration: 7200 / 10000 [ 72%]  (Sampling) 
Chain 4 Iteration: 7300 / 10000 [ 73%]  (Sampling) 
Chain 4 Iteration: 7400 / 10000 [ 74%]  (Sampling) 
Chain 4 Iteration: 7500 / 10000 [ 75%]  (Sampling) 
Chain 4 Iteration: 7600 / 10000 [ 76%]  (Sampling) 
Chain 4 Iteration: 7700 / 10000 [ 77%]  (Sampling) 
Chain 4 Iteration: 7800 / 10000 [ 78%]  (Sampling) 
Chain 4 Iteration: 7900 / 10000 [ 79%]  (Sampling) 
Chain 4 Iteration: 8000 / 10000 [ 80%]  (Sampling) 
Chain 4 Iteration: 8100 / 10000 [ 81%]  (Sampling) 
Chain 4 Iteration: 8200 / 10000 [ 82%]  (Sampling) 
Chain 4 Iteration: 8300 / 10000 [ 83%]  (Sampling) 
Chain 4 Iteration: 8400 / 10000 [ 84%]  (Sampling) 
Chain 4 Iteration: 8500 / 10000 [ 85%]  (Sampling) 
Chain 4 Iteration: 8600 / 10000 [ 86%]  (Sampling) 
Chain 4 Iteration: 8700 / 10000 [ 87%]  (Sampling) 
Chain 4 Iteration: 8800 / 10000 [ 88%]  (Sampling) 
Chain 4 Iteration: 8900 / 10000 [ 89%]  (Sampling) 
Chain 4 Iteration: 9000 / 10000 [ 90%]  (Sampling) 
Chain 4 Iteration: 9100 / 10000 [ 91%]  (Sampling) 
Chain 4 Iteration: 9200 / 10000 [ 92%]  (Sampling) 
Chain 4 Iteration: 9300 / 10000 [ 93%]  (Sampling) 
Chain 4 Iteration: 9400 / 10000 [ 94%]  (Sampling) 
Chain 4 Iteration: 9500 / 10000 [ 95%]  (Sampling) 
Chain 4 Iteration: 9600 / 10000 [ 96%]  (Sampling) 
Chain 4 Iteration: 9700 / 10000 [ 97%]  (Sampling) 
Chain 4 Iteration: 9800 / 10000 [ 98%]  (Sampling) 
Chain 4 Iteration: 9900 / 10000 [ 99%]  (Sampling) 
Chain 4 Iteration: 10000 / 10000 [100%]  (Sampling) 
Chain 4 finished in 10.0 seconds.

All 4 chains finished successfully.
Mean chain execution time: 10.6 seconds.
Total execution time: 42.7 seconds.
precis(bayes_PoissonRegLink)

We can take draws from the posterior distribution using the extract.samples function.

mySamples<-extract.samples(bayes_PoissonRegLink,n=1000)
mySamples
$b0
   [1] 0.989985 0.968409 1.027060 0.992727 0.992551 1.042360 0.999419 1.027820 1.023960 1.047450 0.984286 1.022210 1.056590 0.986058 1.005710 1.017540 1.041650
  [18] 1.005690 1.000390 1.018090 0.992872 0.976309 1.000810 0.995771 1.063700 0.959966 0.975394 0.975767 0.980258 1.017410 1.037710 0.988541 1.079290 1.038870
  [35] 0.942171 0.966107 1.010760 1.009020 1.009510 0.984708 1.002740 0.998179 0.962346 0.967638 0.999110 0.983114 1.041680 1.006650 0.994490 1.027030 0.999848
  [52] 0.998604 0.987081 1.031000 0.971114 0.972606 1.000400 1.056520 0.966675 1.009810 1.018190 1.032650 0.994487 1.034430 1.006070 0.969895 1.006430 1.015320
  [69] 1.002070 1.005210 1.018540 0.985642 0.993191 0.999831 0.995778 1.079610 1.037680 1.008710 1.023710 0.967331 1.019160 1.001350 1.001860 1.038970 1.039990
  [86] 0.982970 0.974534 1.043250 1.037500 1.009060 0.974856 1.021920 1.021760 1.012310 1.021200 1.056760 0.944591 1.021050 1.002380 0.994528 0.997503 1.070870
 [103] 1.005380 0.974339 0.993967 0.986320 0.988834 1.012530 1.012370 1.045910 0.962363 1.023550 1.013790 0.989677 0.976917 1.016350 1.041670 1.013190 0.995639
 [120] 1.019760 0.940644 1.031760 1.001130 1.013080 0.989777 0.964434 1.007920 1.003040 0.995478 0.981701 1.004560 1.058960 1.035710 0.996784 0.995685 0.978309
 [137] 1.037080 0.986444 1.001520 0.978372 1.010680 0.966768 1.015720 0.988371 0.976750 0.957528 1.026590 1.026010 1.035980 1.015960 1.030790 0.962822 1.021670
 [154] 0.992285 1.022490 0.972356 0.956161 1.026330 1.018690 1.015500 1.010300 0.982227 0.966543 1.027370 1.026810 0.964422 1.011260 1.015570 1.012920 1.015700
 [171] 0.981422 1.016990 1.022070 1.023300 0.997569 1.014700 0.975611 0.990095 0.955111 0.984792 1.037490 1.077270 1.005330 1.046500 1.030670 0.971031 0.991097
 [188] 0.972830 1.018250 0.967504 1.001200 1.000990 1.009170 0.971852 0.975176 0.985989 1.013390 1.034810 0.992774 1.009180 1.022910 0.971051 1.021500 0.991885
 [205] 1.073760 1.008630 0.960743 1.004350 0.981008 1.021860 1.028130 1.017440 1.014130 1.015640 0.987776 1.014340 1.008490 0.992747 0.989332 0.981645 0.930796
 [222] 1.022540 1.031210 1.020880 1.023360 1.024530 0.994934 1.008150 1.040600 1.010580 1.021750 0.978331 1.000180 1.035320 1.047080 1.000760 1.015050 0.976637
 [239] 1.002210 1.023400 0.953541 0.995420 1.025060 1.015960 0.994523 0.978585 1.020900 0.998879 1.019530 1.025060 1.031110 0.993197 0.973271 1.019650 1.069960
 [256] 0.977216 1.056460 1.009280 1.002310 1.054360 1.029030 0.980942 1.040010 0.975956 1.015740 1.038800 1.029100 1.051170 1.024430 0.999787 0.993108 0.956668
 [273] 0.984621 0.979569 0.968478 0.998793 1.000110 0.976306 0.963508 1.034930 1.000770 1.032540 1.012740 1.020570 0.996262 1.014660 1.017840 1.035930 0.992325
 [290] 1.054770 1.042700 1.014700 0.956766 0.982251 1.012110 0.998384 1.007320 1.040290 0.979622 1.014260 1.043030 0.975583 0.959687 0.958638 1.014030 0.994645
 [307] 0.986231 0.958057 1.035270 0.995737 0.985358 0.977902 1.010890 0.933672 0.980310 0.992710 0.980158 1.029110 0.995012 0.994588 1.057990 0.981633 0.961395
 [324] 0.993369 1.010950 1.024760 0.992828 1.020340 1.014920 0.981148 1.005160 1.030090 1.031660 1.035240 1.006240 0.953644 1.020060 0.992386 1.002480 1.012480
 [341] 1.026070 0.999301 1.038390 0.978305 0.997605 0.988468 1.034940 0.980319 1.030300 1.040570 0.986114 1.047150 0.981652 1.039280 0.972902 0.977252 1.010080
 [358] 0.974268 1.054000 1.039360 1.026460 1.022830 1.036230 0.986114 0.992631 1.041640 0.961542 0.988278 1.062090 0.980751 1.016270 1.001440 0.989712 0.989373
 [375] 0.985306 0.973913 0.994006 1.014520 0.995356 1.021860 1.037800 1.023990 0.966419 0.993000 0.985599 0.958314 1.043020 1.027590 1.003130 0.983930 0.958544
 [392] 0.998960 0.970084 1.022240 1.006180 1.018380 0.957368 1.045050 1.045630 0.987615 0.980272 1.058480 0.982450 1.036490 0.955444 1.028300 1.028450 1.038990
 [409] 1.026380 1.006500 1.023670 0.975971 0.983913 1.080350 0.998962 0.994767 0.992457 1.005820 0.983154 0.994582 0.999518 0.970184 0.983170 1.048710 0.992228
 [426] 1.049470 0.990444 1.049900 0.992972 1.017170 1.033970 1.005510 0.986031 1.026560 1.009480 1.013570 0.966895 0.996708 0.964163 0.947956 1.034100 0.954212
 [443] 0.975108 1.017130 0.986904 0.994487 1.011310 0.982647 1.008530 0.968107 1.037490 0.972626 0.966308 0.957600 1.026560 0.965392 1.001680 0.999529 1.033110
 [460] 0.996790 0.985956 0.944852 0.996776 1.027970 0.935059 0.957946 1.041870 1.001850 1.004300 1.009060 1.007040 0.992946 1.027230 1.029610 1.022370 0.964697
 [477] 1.015560 1.031760 1.015040 1.022180 1.021260 1.009980 0.942141 0.963957 1.027660 1.014600 1.018800 1.001000 0.984666 0.997409 0.995350 0.991263 0.966158
 [494] 0.958038 1.049920 1.023880 0.998424 1.008500 0.982988 1.007290 1.027710 0.984371 1.022970 0.967803 1.045320 1.001130 0.979341 1.027350 0.961074 1.023040
 [511] 0.965936 1.007120 1.013300 1.025820 1.018540 0.955343 0.999106 1.020380 1.088100 0.997342 1.033820 0.977298 1.041870 1.028580 1.002120 1.036470 0.994042
 [528] 1.029090 1.012820 0.963730 0.996200 0.993994 0.970257 1.020010 1.019060 0.971299 1.044490 1.018830 1.026670 1.004150 0.988665 1.022910 1.012900 1.044080
 [545] 1.026740 1.005110 0.995863 1.006790 1.012910 0.952691 0.983266 1.026650 1.032040 1.009390 1.024240 1.060180 1.048730 1.009470 1.015140 1.028660 1.053610
 [562] 1.007680 1.001100 0.993615 1.014960 1.016860 1.045420 1.015380 0.929321 0.942857 1.020020 0.963377 0.994616 1.007600 1.001420 0.982535 1.047620 1.023110
 [579] 1.016000 0.997645 1.009210 1.024200 0.974839 1.035330 1.015120 0.981219 0.999059 1.049770 1.029470 1.086050 1.013650 1.008330 0.997181 0.983169 1.034970
 [596] 0.999094 1.015790 0.994627 1.022680 1.011130 1.007870 0.997697 1.041950 1.005830 1.041770 0.979431 1.062270 1.015960 1.006300 1.000640 1.015580 1.043480
 [613] 1.040010 0.975756 1.015520 1.004460 0.983253 1.011160 0.981840 0.959624 1.016070 1.008310 1.017560 1.034630 1.011330 0.972494 1.011950 1.033730 0.990838
 [630] 1.010830 1.029180 0.982560 1.054080 0.970473 0.976256 0.977305 1.004760 1.024070 1.037590 0.995453 0.989679 0.988477 0.982542 1.076640 1.001210 1.023860
 [647] 1.012030 0.989104 1.026160 1.007530 1.020360 1.020860 0.962595 1.048180 0.959348 1.017300 1.029380 1.056180 0.987718 1.021440 1.010150 1.000150 1.003820
 [664] 1.000590 1.033350 1.024650 0.952680 0.986671 0.964484 1.010500 1.076020 1.001530 1.025980 0.970949 0.988537 1.012370 0.975790 0.968991 0.973532 1.014190
 [681] 0.996038 0.974318 1.034270 1.007620 1.003190 0.985377 0.947165 1.014210 0.980289 0.986463 0.978957 1.041020 1.010050 1.042600 1.085240 0.982801 1.003630
 [698] 1.031540 0.973994 1.004210 0.981299 0.975334 1.007150 1.048850 0.992429 1.016830 1.008770 1.029010 0.939958 1.008970 1.054990 0.988433 0.982209 1.025210
 [715] 0.948559 0.968871 1.015080 1.012010 0.966164 0.997173 1.025510 1.036510 1.030810 0.997747 0.989962 0.988267 1.055430 1.007650 0.997313 0.993339 1.007460
 [732] 1.016580 1.002520 1.010910 0.986471 0.983744 1.010730 0.999646 1.028170 0.978134 1.048600 1.011230 0.988785 0.980325 0.998761 0.969830 1.063830 0.952381
 [749] 0.999999 1.002880 0.961005 0.998597 1.033760 1.025730 1.044400 1.006310 1.012660 0.960421 0.986064 1.043990 1.018330 1.044180 1.022060 1.000030 0.939430
 [766] 1.036100 0.998251 1.028780 0.997300 1.002510 1.016090 1.010650 1.021380 1.037960 1.021800 1.000570 0.992303 0.988049 1.023740 1.010220 1.007320 1.037250
 [783] 0.992700 1.012360 0.980761 1.022690 1.012660 1.004150 1.021120 1.026280 1.011540 1.000440 0.987682 1.025680 0.995446 0.965373 1.031260 1.003110 0.995460
 [800] 1.003050 0.991761 1.000990 1.007900 1.043940 1.037300 1.056930 1.032240 1.071220 0.973531 0.993559 1.018670 1.004120 1.021970 0.994052 0.979224 1.000890
 [817] 0.965271 0.972172 1.021220 1.028880 1.042220 1.020960 1.019350 1.036520 1.014130 1.022950 1.043880 0.994888 0.991524 0.979393 1.023700 0.997635 0.980891
 [834] 0.956743 1.016940 0.994758 1.008390 0.935280 1.023360 1.022030 0.975551 0.992441 1.020710 0.965782 0.985133 0.992604 1.014670 1.009960 0.965376 0.976370
 [851] 0.969219 1.017150 1.025210 1.000110 0.993252 1.020500 1.047060 0.965706 1.002170 0.955859 1.001060 1.065270 1.049390 0.971299 0.992824 1.008940 1.007050
 [868] 0.989027 0.996205 1.001090 0.993036 0.994951 0.963459 0.993568 0.977929 1.028290 1.015130 0.949062 1.026430 1.018460 1.022650 1.016270 1.026150 1.049300
 [885] 1.008680 0.964985 1.018280 0.966882 1.046420 1.013330 1.011830 1.010740 0.974952 1.008440 1.008210 0.986020 1.001910 0.990557 1.009460 0.991512 0.962818
 [902] 1.015210 0.996975 0.990539 1.013170 0.982267 0.995809 1.039010 1.012730 1.009170 0.968363 1.007750 0.984719 0.987669 1.022200 0.989237 0.996565 0.985336
 [919] 1.016300 1.039030 0.995748 0.998737 0.976242 1.008950 1.013950 0.985190 0.986668 1.002350 0.964991 1.010350 0.950880 0.993243 1.015500 0.941861 0.986134
 [936] 1.004770 0.977929 0.992291 1.020590 0.964485 1.030250 1.001800 0.976319 1.042190 1.028630 1.004460 0.988969 1.025920 0.991242 0.988977 1.002970 0.989106
 [953] 0.965263 1.001760 1.034490 0.992572 1.046090 1.004290 0.987309 0.984460 1.023820 0.930209 0.998605 0.971483 0.999879 1.000180 1.019990 0.962619 0.990322
 [970] 1.031690 1.015700 1.018410 1.035420 1.018170 1.015280 0.980850 1.081500 0.973362 0.954926 1.048960 1.030290 0.980436 0.970764 1.016340 0.999127 0.988506
 [987] 0.975168 1.033600 1.002580 1.078280 1.010120 1.027420 0.972065 1.004740 0.991323 1.009980 0.960360 0.990975 0.993629 0.991313

$b1
   [1] 0.0201251 0.0205488 0.0197090 0.0198916 0.0199014 0.0196525 0.0200111 0.0198066 0.0196155 0.0194371 0.0200677 0.0197026 0.0191311 0.0201560 0.0201187
  [16] 0.0193925 0.0193563 0.0203735 0.0198048 0.0198071 0.0200268 0.0201537 0.0198627 0.0202876 0.0192366 0.0204755 0.0202079 0.0203058 0.0201773 0.0196352
  [31] 0.0192799 0.0200439 0.0189598 0.0195966 0.0207437 0.0205682 0.0198843 0.0199787 0.0199126 0.0202113 0.0198611 0.0199231 0.0204995 0.0206775 0.0201730
  [46] 0.0203054 0.0197748 0.0196905 0.0198348 0.0194414 0.0201821 0.0199302 0.0204029 0.0198576 0.0207301 0.0201875 0.0201079 0.0193314 0.0206146 0.0199087
  [61] 0.0200144 0.0194251 0.0200233 0.0193605 0.0198585 0.0199836 0.0198579 0.0200543 0.0198082 0.0198611 0.0196435 0.0200600 0.0200845 0.0200205 0.0201939
  [76] 0.0191268 0.0192374 0.0200392 0.0195545 0.0205130 0.0198190 0.0199093 0.0202031 0.0194277 0.0198189 0.0201274 0.0202424 0.0194635 0.0193010 0.0195788
  [91] 0.0199344 0.0197826 0.0197049 0.0198371 0.0198578 0.0193509 0.0209687 0.0194741 0.0200744 0.0200897 0.0200906 0.0189273 0.0201993 0.0202856 0.0201263
 [106] 0.0203323 0.0200747 0.0196356 0.0201279 0.0193159 0.0204191 0.0195671 0.0198547 0.0202514 0.0200746 0.0194017 0.0191173 0.0197083 0.0201377 0.0197026
 [121] 0.0208297 0.0197858 0.0197507 0.0200457 0.0204066 0.0205909 0.0199640 0.0199700 0.0201606 0.0202004 0.0200271 0.0192668 0.0194682 0.0198911 0.0199498
 [136] 0.0202186 0.0194778 0.0202597 0.0198628 0.0202123 0.0195690 0.0205062 0.0197834 0.0202665 0.0202386 0.0206360 0.0195805 0.0196580 0.0193712 0.0198529
 [151] 0.0196591 0.0202720 0.0195565 0.0203909 0.0194442 0.0202262 0.0206685 0.0196458 0.0196100 0.0197030 0.0197548 0.0203912 0.0207953 0.0195601 0.0194345
 [166] 0.0203018 0.0197360 0.0200081 0.0199073 0.0196265 0.0199174 0.0197449 0.0195163 0.0196268 0.0201632 0.0197755 0.0204211 0.0202232 0.0204377 0.0201050
 [181] 0.0193505 0.0190455 0.0201955 0.0193321 0.0195728 0.0201813 0.0199633 0.0203989 0.0195579 0.0205708 0.0200578 0.0201703 0.0199662 0.0203453 0.0203554
 [196] 0.0201827 0.0196386 0.0193969 0.0202074 0.0197795 0.0200009 0.0203404 0.0197982 0.0202244 0.0189870 0.0199102 0.0202200 0.0201694 0.0202698 0.0195564
 [211] 0.0197473 0.0199764 0.0195540 0.0199487 0.0200553 0.0199034 0.0201644 0.0198933 0.0200371 0.0203597 0.0208349 0.0198827 0.0196077 0.0194957 0.0197291
 [226] 0.0195303 0.0200608 0.0199861 0.0194032 0.0197970 0.0197960 0.0201902 0.0201468 0.0197042 0.0193164 0.0199444 0.0197474 0.0200580 0.0203169 0.0194485
 [241] 0.0205718 0.0199908 0.0197899 0.0198473 0.0202691 0.0202788 0.0197953 0.0199720 0.0194928 0.0194791 0.0194524 0.0201628 0.0202531 0.0199554 0.0190257
 [256] 0.0202177 0.0193311 0.0198699 0.0201033 0.0192164 0.0195170 0.0201462 0.0192584 0.0202277 0.0200007 0.0193670 0.0197399 0.0194136 0.0196999 0.0197831
 [271] 0.0200571 0.0206567 0.0205228 0.0200976 0.0204271 0.0200086 0.0201881 0.0204304 0.0205897 0.0198242 0.0199911 0.0198745 0.0198641 0.0198001 0.0202393
 [286] 0.0200308 0.0197337 0.0195638 0.0201010 0.0193596 0.0197350 0.0197371 0.0206088 0.0204652 0.0198282 0.0202161 0.0200587 0.0192445 0.0203418 0.0198227
 [301] 0.0191014 0.0202017 0.0205767 0.0205341 0.0197576 0.0200053 0.0199950 0.0205588 0.0195909 0.0198560 0.0203508 0.0202987 0.0197804 0.0207839 0.0200959
 [316] 0.0199394 0.0203522 0.0194527 0.0197833 0.0202820 0.0192022 0.0202247 0.0204981 0.0201536 0.0198698 0.0194618 0.0200060 0.0199239 0.0195854 0.0203586
 [331] 0.0197590 0.0194619 0.0196315 0.0197508 0.0197814 0.0205458 0.0197065 0.0202053 0.0198378 0.0198391 0.0198837 0.0203676 0.0193436 0.0202503 0.0199438
 [346] 0.0200938 0.0193620 0.0203567 0.0197748 0.0193200 0.0201943 0.0195227 0.0203600 0.0196356 0.0207150 0.0205059 0.0199912 0.0204261 0.0193005 0.0194955
 [361] 0.0196057 0.0198639 0.0195340 0.0204231 0.0200525 0.0195121 0.0204764 0.0201388 0.0190820 0.0199592 0.0197459 0.0199818 0.0202889 0.0200458 0.0203254
 [376] 0.0204270 0.0201436 0.0198847 0.0201589 0.0194854 0.0194118 0.0197164 0.0204095 0.0200476 0.0199336 0.0205257 0.0194354 0.0195250 0.0200512 0.0199947
 [391] 0.0205986 0.0198688 0.0203554 0.0198613 0.0199537 0.0199064 0.0204356 0.0195594 0.0194125 0.0200620 0.0201645 0.0191464 0.0203927 0.0197011 0.0205251
 [406] 0.0194139 0.0198168 0.0194355 0.0199059 0.0196492 0.0196215 0.0203341 0.0202178 0.0189536 0.0199819 0.0201156 0.0200876 0.0199893 0.0201905 0.0200209
 [421] 0.0202385 0.0204213 0.0206274 0.0193704 0.0201234 0.0192559 0.0200175 0.0192484 0.0201813 0.0196339 0.0199369 0.0196695 0.0204224 0.0196304 0.0198433
 [436] 0.0198468 0.0203484 0.0199195 0.0203798 0.0209081 0.0197710 0.0206736 0.0205757 0.0195739 0.0202715 0.0199935 0.0199265 0.0206022 0.0199251 0.0205734
 [451] 0.0193748 0.0205024 0.0205201 0.0204851 0.0195867 0.0207144 0.0199689 0.0199183 0.0194338 0.0200545 0.0202864 0.0208078 0.0198745 0.0195019 0.0209239
 [466] 0.0201767 0.0193176 0.0199414 0.0196413 0.0198826 0.0198810 0.0201455 0.0196002 0.0195126 0.0196075 0.0203743 0.0197728 0.0194842 0.0197450 0.0197792
 [481] 0.0196242 0.0194808 0.0207971 0.0203283 0.0196224 0.0199280 0.0200450 0.0201614 0.0201889 0.0201249 0.0200442 0.0198424 0.0204553 0.0205300 0.0195393
 [496] 0.0195970 0.0199708 0.0195885 0.0201917 0.0198381 0.0197567 0.0201788 0.0197344 0.0202092 0.0194787 0.0198806 0.0202546 0.0196592 0.0203187 0.0196483
 [511] 0.0204040 0.0201049 0.0196709 0.0195458 0.0197958 0.0206035 0.0199183 0.0198921 0.0190305 0.0200708 0.0197291 0.0203226 0.0198442 0.0195831 0.0201815
 [526] 0.0195444 0.0201797 0.0196055 0.0197301 0.0204325 0.0199639 0.0203540 0.0204279 0.0201166 0.0198222 0.0203985 0.0195620 0.0197085 0.0193400 0.0196233
 [541] 0.0200852 0.0196145 0.0196919 0.0192216 0.0197504 0.0199344 0.0198921 0.0198922 0.0199645 0.0205736 0.0201121 0.0197959 0.0196582 0.0196817 0.0198059
 [556] 0.0191867 0.0195224 0.0200674 0.0198844 0.0194914 0.0195468 0.0198194 0.0203398 0.0199961 0.0196173 0.0198122 0.0195197 0.0200368 0.0208879 0.0206008
 [571] 0.0197802 0.0205717 0.0200271 0.0197696 0.0199953 0.0202392 0.0191416 0.0194120 0.0197810 0.0199948 0.0198132 0.0197624 0.0203673 0.0195706 0.0198159
 [586] 0.0199767 0.0200283 0.0189762 0.0193877 0.0189046 0.0198827 0.0201448 0.0198375 0.0201486 0.0195211 0.0201303 0.0200524 0.0203957 0.0198099 0.0199318
 [601] 0.0197598 0.0199351 0.0193744 0.0198442 0.0194052 0.0203464 0.0192061 0.0195361 0.0200870 0.0200598 0.0199889 0.0192888 0.0198088 0.0202529 0.0195605
 [616] 0.0199267 0.0201701 0.0198740 0.0201397 0.0208315 0.0198891 0.0200664 0.0197331 0.0193916 0.0195985 0.0205721 0.0201473 0.0195728 0.0202680 0.0201173
 [631] 0.0198858 0.0201701 0.0192520 0.0203235 0.0203349 0.0203052 0.0199899 0.0200271 0.0193707 0.0200108 0.0201818 0.0200103 0.0204330 0.0185397 0.0197213
 [646] 0.0196185 0.0198305 0.0202638 0.0196388 0.0199650 0.0197799 0.0198168 0.0202825 0.0195391 0.0203731 0.0197682 0.0197958 0.0191443 0.0201398 0.0197307
 [661] 0.0199489 0.0199719 0.0199019 0.0199262 0.0197723 0.0197094 0.0204625 0.0201795 0.0204885 0.0198400 0.0185913 0.0198465 0.0199883 0.0202441 0.0204717
 [676] 0.0199262 0.0205885 0.0205671 0.0201699 0.0201506 0.0199799 0.0203918 0.0198863 0.0200423 0.0198472 0.0201552 0.0205479 0.0198120 0.0199375 0.0202131
 [691] 0.0200737 0.0192934 0.0200935 0.0195553 0.0189561 0.0201539 0.0199408 0.0196262 0.0203957 0.0200850 0.0201636 0.0204550 0.0198313 0.0198071 0.0201992
 [706] 0.0197144 0.0198790 0.0196188 0.0207728 0.0200830 0.0193454 0.0201273 0.0202878 0.0196739 0.0204383 0.0202809 0.0197645 0.0195601 0.0208024 0.0203412
 [721] 0.0197418 0.0194014 0.0196724 0.0199950 0.0199932 0.0203643 0.0191735 0.0198182 0.0200734 0.0200653 0.0199206 0.0198337 0.0201676 0.0199402 0.0203160
 [736] 0.0203651 0.0199330 0.0200500 0.0197710 0.0201792 0.0194045 0.0195024 0.0202641 0.0199771 0.0201111 0.0203158 0.0191260 0.0204858 0.0200533 0.0200783
 [751] 0.0204118 0.0200799 0.0194410 0.0193926 0.0195161 0.0199058 0.0197598 0.0205195 0.0201509 0.0191506 0.0197482 0.0191485 0.0198637 0.0200408 0.0210130
 [766] 0.0198072 0.0200796 0.0195911 0.0201614 0.0201581 0.0198281 0.0199732 0.0198199 0.0196411 0.0193999 0.0201665 0.0198646 0.0200761 0.0198319 0.0194977
 [781] 0.0197690 0.0194062 0.0199054 0.0198289 0.0202829 0.0195752 0.0198819 0.0197088 0.0195294 0.0195833 0.0199481 0.0201315 0.0202433 0.0197094 0.0202962
 [796] 0.0202990 0.0198685 0.0199791 0.0200606 0.0200501 0.0202368 0.0198769 0.0203191 0.0194435 0.0193235 0.0194046 0.0199921 0.0188333 0.0202729 0.0201373
 [811] 0.0198835 0.0199571 0.0199127 0.0199317 0.0199773 0.0198335 0.0205088 0.0200600 0.0195894 0.0195446 0.0195428 0.0199151 0.0199480 0.0195854 0.0196996
 [826] 0.0195724 0.0191116 0.0201048 0.0201733 0.0200563 0.0193853 0.0200594 0.0198771 0.0206744 0.0196925 0.0199482 0.0200807 0.0208296 0.0197761 0.0198890
 [841] 0.0201549 0.0202577 0.0198406 0.0205372 0.0202776 0.0200898 0.0200703 0.0198187 0.0206325 0.0204037 0.0203729 0.0199523 0.0198472 0.0201421 0.0200583
 [856] 0.0196768 0.0192333 0.0205726 0.0200021 0.0207217 0.0197613 0.0192615 0.0193191 0.0204151 0.0199541 0.0200995 0.0199731 0.0203167 0.0201460 0.0200311
 [871] 0.0197620 0.0200851 0.0205155 0.0199526 0.0201990 0.0196140 0.0199558 0.0209694 0.0199344 0.0196703 0.0198374 0.0199133 0.0197132 0.0194019 0.0198808
 [886] 0.0205516 0.0200159 0.0204956 0.0194390 0.0197823 0.0201274 0.0198305 0.0203602 0.0199023 0.0198741 0.0202258 0.0198448 0.0200210 0.0199434 0.0203729
 [901] 0.0203948 0.0197819 0.0201131 0.0201838 0.0198574 0.0203286 0.0199701 0.0194912 0.0195903 0.0199796 0.0204617 0.0199400 0.0204373 0.0201845 0.0199159
 [916] 0.0204255 0.0200307 0.0202432 0.0198156 0.0194218 0.0200440 0.0201164 0.0201601 0.0197023 0.0198486 0.0204388 0.0202569 0.0200788 0.0203607 0.0197273
 [931] 0.0206160 0.0199079 0.0197623 0.0209937 0.0200224 0.0200709 0.0201904 0.0198622 0.0198543 0.0204749 0.0196903 0.0201183 0.0201400 0.0193798 0.0196486
 [946] 0.0200383 0.0199696 0.0195203 0.0202115 0.0202322 0.0199244 0.0201378 0.0205827 0.0198141 0.0195984 0.0200420 0.0192623 0.0198456 0.0204921 0.0202851
 [961] 0.0195530 0.0208314 0.0200912 0.0202356 0.0200493 0.0198471 0.0197377 0.0202706 0.0200508 0.0197821 0.0199593 0.0197641 0.0196046 0.0197248 0.0199332
 [976] 0.0203217 0.0189493 0.0203308 0.0205755 0.0194357 0.0195044 0.0202000 0.0200651 0.0196783 0.0200919 0.0198244 0.0204420 0.0194694 0.0199006 0.0188796
 [991] 0.0200598 0.0196320 0.0205490 0.0199663 0.0201387 0.0196771 0.0206687 0.0199630 0.0199475 0.0202061

attr(,"source")
[1] "ulam posterior: 1000 samples from object"

Now lets make some posterior predictions. We have to supply data for where we want the predictions.This is specified in the ‘data=’ code below.

The link function returns the draws for the posterior Lambda at each level of x, whereas the sim returns draws of actual data Y or counts from each level of x.

myPredictLambda<-link(fit=bayes_PoissonRegLink,data=list(x=c(10,20,30)),
                   n=1000)
head(myPredictLambda)
         [,1]     [,2]     [,3]
[1,] 3.291147 4.024847 4.922113
[2,] 3.234573 3.972458 4.878672
[3,] 3.401274 4.142254 5.044659
[4,] 3.292486 4.017095 4.901175
[5,] 3.292230 4.017175 4.901754
[6,] 3.451763 4.201367 5.113760
myPredictObs<-sim(fit=bayes_PoissonRegLink,data=list(x=c(10,20,30)),
                   n=1000)
head(myPredictObs)
     [,1] [,2] [,3]
[1,]    3    5    8
[2,]    4    7    4
[3,]    3    6    3
[4,]    2    4    1
[5,]    4    4    4
[6,]    2    2    5

Finally, making some traceplots to examine the mcmc samples. You can either use the functions built into rethinking or try using some of the other R libraries for examining mcmc fits. This may require some conversions of the ulam output to be compatible with the other libraries.

traceplot_ulam(bayes_PoissonRegLink)

converting samples for use with coda library.

library(coda)
mySamples<-extract.samples(bayes_PoissonRegLink,n=1000)
mySamples<-as.mcmc(cbind(mySamples$b0,mySamples$b1))
traceplot(mySamples)

NA
NA
NA

Here is another MCMC library that could be useful: tidybayes. I don’t demonstrate it here but want folks to be aware of it. For tidybayes, you need to add a rethinking extension. See this link: https://mjskay.github.io/tidybayes.rethinking/

MCMCvis is another library that could probably be made to work with rethinking.

Scratch code below………this is code that I often find useful but is not central to what is done above

Here is some code to detach all libraries…

invisible(lapply(paste0('package:', names(sessionInfo()$otherPkgs)), detach, character.only=TRUE, unload=TRUE))
library(pryr)
S4toList <- function(obj) {
   sn <- slotNames(obj)
   structure(lapply(sn, slot, object = obj), names = sn)
}
S4toList(bayes_PoissonRegLink)





This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. 

Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Cmd+Shift+Enter*. 


<!-- rnb-text-end -->


<!-- rnb-chunk-begin -->


<!-- rnb-source-begin eyJkYXRhIjoiYGBgclxucGxvdChjYXJzKVxuYGBgIn0= -->

```r
plot(cars)

Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Cmd+Option+I.

When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).

The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.

LS0tCnRpdGxlOiAiUG9pc3NvbiBSZWdyZXNzaW9uIgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgoKTGV0J3MgZ2VuZXJhdGUgc29tZSBQb2lzc29uIGRhdGEuIEkgZ2VuZXJhdGUgdHdvIGRhdGEgc2V0cy4geU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