From e42be32e4b264a6667a9c0605199efe72b16d9bc Mon Sep 17 00:00:00 2001
From: jgabry This outlines how to propose a change to cmdstanr and is based on similar instructions for tidyverse packages, including the contributing guidelines generated by You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the source file. This generally means you’ll need to edit roxygen2 comments in an If you want to make a bigger change, it’s a good idea to first file an issue and make sure someone from the team agrees that it’s needed. If you’ve found a bug, please file an issue that illustrates the bug with a minimal reproducible example (see e.g. the tidyverse reprex instructions). The tidyverse guide on how to create a great issue has more advice. If you are new to creating pull requests here are some tips. Using the functions from the Fork the package and clone onto your computer. If you haven’t done this before, we recommend using Install all development dependencies with Create a Git branch for your pull request (PR). We recommend using Make your changes, commit to git, and then create a PR by running For user-facing changes, add a bullet to the top of New code should attempt to follow the style used in the package. When in doubt follow the tidyverse style guide. We use roxygen2, with Markdown syntax, for documentation. We use testthat for unit tests. Contributions with test cases included are easier to accept. Please note that the cmdstanr project follows the Stan project’s Code of Conduct. By contributing to this project you agree to abide by its terms. For the latest information on the checks performed in pedantic mode
-see the Pedantic
+see the Pedantic
mode chapter in the Stan Reference Manual. Pedantic mode is available when compiling the model or when using the
separate Contributing to cmdstanr
+ usethis::use_tidy_contributing()
.Fixing typos
+.R
, not a .Rd
file. You can find the .R
file that generates the .Rd
by reading the comment in the first line.Bigger changes
+Pull request process
+usethis
package is not required but can be helpful if this process is new to you.usethis::create_from_github("stan-dev/cmdstanr", fork = TRUE)
.devtools::install_dev_deps()
, and then make sure the package passes R CMD check by running devtools::check()
. If R CMD check doesn’t pass cleanly, it’s a good idea to ask for help before continuing.usethis::pr_init("brief-description-of-change")
.usethis::pr_push()
, and following the prompts in your browser. The title of your PR should briefly describe the change. The body of your PR should contain Fixes #issue-number
.NEWS.md
(i.e. just below the first header). Follow the style already used in NEWS.md
.Code style
+Code of Conduct
+Pedantic check
$check_syntax()
method of a
@@ -278,7 +278,7 @@ Pedantic check$compile() method directly if using
the delayed compilation approach described above).
mod_pedantic <- cmdstan_model(stan_file_pedantic, pedantic = TRUE) -Warning in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d863015ed4.stan', line 11, column 14: A +Warning in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-74281eb75594.stan', line 11, column 14: A poisson distribution is given parameter lambda as a rate parameter (argument 1), but lambda was not constrained to be strictly positive. Warning: The parameter lambda has no priors. This means either no prior is @@ -288,7 +288,7 @@
argument to thePedantic checkpedantic
$check_syntax()
method.mod_pedantic$check_syntax(pedantic = TRUE) -Warning in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model_febb1e69c7387a0e64cf13583e078104.stan', line 11, column 14: A +Warning in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model_febb1e69c7387a0e64cf13583e078104.stan', line 11, column 14: A poisson distribution is given parameter lambda as a rate parameter (argument 1), but lambda was not constrained to be strictly positive. Warning: The parameter lambda has no priors. This means either no prior is @@ -305,7 +305,7 @@
Pedantic check mod_pedantic <- cmdstan_model(stan_file_pedantic, compile = FALSE) mod_pedantic$check_syntax(pedantic = TRUE) -Warning in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model_febb1e69c7387a0e64cf13583e078104.stan', line 11, column 14: A +Warning in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model_febb1e69c7387a0e64cf13583e078104.stan', line 11, column 14: A poisson distribution is given parameter lambda as a rate parameter (argument 1), but lambda was not constrained to be strictly positive. Warning: The parameter lambda has no priors. This means either no prior is @@ -495,10 +495,10 @@
Default temporary files
-fit$output_files()
+[1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-202311081035-1-36f995.csv" -[2] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-202311081035-2-36f995.csv" -[3] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-202311081035-3-36f995.csv" -[4] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-202311081035-4-36f995.csv"
[1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-202312131009-1-37e810.csv" +[2] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-202312131009-2-37e810.csv" +[3] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-202312131009-3-37e810.csv" +[4] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-202312131009-4-37e810.csv"
These files will be lost if you end your R session or if you remove the
@@ -510,8 +510,8 @@fit
object and force (or wait for) garbage collection.Default temporary filesrm(fit) gc()
+Ncells 1260600 67.4 2436292 130.2 NA 2436292 130.2 +Vcells 2212085 16.9 8388608 64.0 32768 3459642 26.4used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) -Ncells 1249060 66.8 2424964 129.6 NA 2424964 129.6 -Vcells 2192048 16.8 8388608 64.0 32768 3407356 26.0
file.exists(files)
[1] FALSE FALSE FALSE FALSE
@@ -561,14 +561,14 @@ After we call a method that requires the draws then if we reexamine @@ -623,14 +623,14 @@
For models with many parameters, transformed parameters, or generated @@ -688,7 +688,7 @@
fit <- mod$sample(data = data_list, save_latent_dynamics = TRUE)
fit$latent_dynamics_files()
[1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-diagnostic-202311081035-1-460fca.csv"
-[2] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-diagnostic-202311081035-2-460fca.csv"
-[3] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-diagnostic-202311081035-3-460fca.csv"
-[4] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-diagnostic-202311081035-4-460fca.csv"
+[1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-diagnostic-202312131009-1-425883.csv"
+[2] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-diagnostic-202312131009-2-425883.csv"
+[3] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-diagnostic-202312131009-3-425883.csv"
+[4] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-diagnostic-202312131009-4-425883.csv"
# read one of the files in
x <- utils::read.csv(fit$latent_dynamics_files()[1], comment.char = "#")
head(x)
lp__ accept_stat__ stepsize__ treedepth__ n_leapfrog__ divergent__
-1 -6.84314 0.979774 0.874237 1 3 0
-2 -7.10483 0.971803 0.874237 2 3 0
-3 -6.85492 1.000000 0.874237 1 1 0
-4 -6.81455 0.951680 0.874237 2 3 0
-5 -6.90994 0.917527 0.874237 2 3 0
-6 -6.75277 1.000000 0.874237 1 3 0
- energy__ theta p_theta g_theta
-1 6.84887 -0.814342 0.139388 0.683591
-2 7.10784 -0.558031 -0.101020 1.368040
-3 7.03534 -0.797632 0.782091 0.726389
-4 7.12956 -0.860038 1.033420 0.567976
-5 7.27609 -0.730035 -1.114150 0.902245
-6 6.87890 -1.033970 -0.653912 0.147785
+1 -9.73111 1.000000 0.932232 2 3 0
+2 -6.75346 1.000000 0.932232 1 3 0
+3 -8.48107 0.665681 0.932232 1 3 0
+4 -7.74234 1.000000 0.932232 1 1 0
+5 -6.82333 1.000000 0.932232 2 3 0
+6 -6.82333 0.784555 0.932232 1 3 0
+ energy__ theta p_theta g_theta
+1 10.97150 0.3939970 -2.155610 4.166930
+2 9.05119 -1.0295100 -2.933880 0.158161
+3 8.61284 0.0530292 0.702591 3.159050
+4 8.45793 -0.2148440 1.637290 2.357940
+5 7.76204 -1.3633100 1.875250 -0.555575
+6 8.04989 -1.3633100 -2.143570 -0.555575
The column lp__
is also provided via
fit$draws()
, and the columns accept_stat__
,
stepsize__
, treedepth__
,
@@ -818,13 +818,13 @@
theta p_theta g_theta
-1 -0.814342 0.139388 0.683591
-2 -0.558031 -0.101020 1.368040
-3 -0.797632 0.782091 0.726389
-4 -0.860038 1.033420 0.567976
-5 -0.730035 -1.114150 0.902245
-6 -1.033970 -0.653912 0.147785
+ theta p_theta g_theta
+1 0.3939970 -2.155610 4.166930
+2 -1.0295100 -2.933880 0.158161
+3 0.0530292 0.702591 3.159050
+4 -0.2148440 1.637290 2.357940
+5 -1.3633100 1.875250 -0.555575
+6 -1.3633100 -2.143570 -0.555575
Our model has a single parameter theta
and the three
columns above correspond to theta
in the
unconstrained space (theta
on the constrained
@@ -872,16 +872,16 @@
Running make \
- /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc \
+ /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467 \
"STANCFLAGS += --name='bernoulli_model'"
--- Translating Stan model to C++ code ---
-bin/stanc --name='bernoulli_model' --o=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc.hpp /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc.stan
+bin/stanc --name='bernoulli_model' --o=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467.hpp /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467.stan
--- Compiling, linking C++ code ---
-clang++ -Wno-deprecated-declarations -Wno-deprecated-declarations -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header_13_0.hpp.gch -x c++ -o /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc.o /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc.hpp
-clang++ -Wno-deprecated-declarations -Wno-deprecated-declarations -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc.o src/cmdstan/main.o -Wl,-L,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc_proxy.dylib -o /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc
-rm -f /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/model-131d8d6680cc.o
+clang++ -Wno-deprecated-declarations -Wno-deprecated-declarations -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header_13_0.hpp.gch -x c++ -o /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467.o /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467.hpp
+clang++ -Wno-deprecated-declarations -Wno-deprecated-declarations -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467.o src/cmdstan/main.o -Wl,-L,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/jgabry/.cmdstan/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb" stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc_proxy.dylib -o /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467
+rm -f /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/model-742871ce8467.o
fit <- mod$sample(
data = data_list,
@@ -891,11 +891,11 @@ Troubleshooting and debugging)
Running MCMC with 1 chain...
-Running ./bernoulli 'id=1' random 'seed=2046085541' data \
- 'file=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/standata-131d874013405.json' \
+Running ./bernoulli 'id=1' random 'seed=90958316' data \
+ 'file=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/standata-742874baeb02.json' \
output \
- 'file=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-202311081036-1-2ef601.csv' \
- 'profile_file=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpT1Jbvd/bernoulli-profile-202311081036-1-0c4891.csv' \
+ 'file=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-202312131009-1-4db120.csv' \
+ 'profile_file=/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpXOnqh8/bernoulli-profile-202312131009-1-1c1f83.csv' \
'method=sample' 'num_samples=100' 'num_warmup=100' 'save_warmup=0' \
'algorithm=hmc' 'engine=nuts' adapt 'engaged=1'
Chain 1 method = sample (Default)
@@ -925,19 +925,19 @@ Troubleshooting and debuggingSampler diagnostic warnings a
suffers from divergences.
fit_with_warning <- cmdstanr_example("schools")
-Warning: 124 of 4000 (3.0%) transitions ended with a divergence.
-See https://mc-stan.org/misc/warnings for details.
-Warning: 1 of 4 chains had an E-BFMI less than 0.2.
+Chain 4 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
+Chain 4 Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/Rtmpl3ZPjU/model-76ac71f3c1fe.stan', line 14, column 2 to column 41)
+Chain 4 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
+Chain 4 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
+Chain 4
+Warning: 149 of 4000 (4.0%) transitions ended with a divergence.
See https://mc-stan.org/misc/warnings for details.
After fitting there is a warning about divergences. We can also
regenerate this warning message later using
fit$diagnostic_summary()
.
-
+
diagnostics <- fit_with_warning$diagnostic_summary()
-Warning: 124 of 4000 (3.0%) transitions ended with a divergence.
-See https://mc-stan.org/misc/warnings for details.
-Warning: 1 of 4 chains had an E-BFMI less than 0.2.
+Warning: 149 of 4000 (4.0%) transitions ended with a divergence.
See https://mc-stan.org/misc/warnings for details.
-
+
print(diagnostics)
$num_divergent
-[1] 3 12 97 12
+[1] 11 54 32 52
$num_max_treedepth
[1] 0 0 0 0
$ebfmi
-[1] 0.20 0.29 0.29 0.43
-
+[1] 0.40 0.36 0.37 0.30
+
# number of divergences reported in warning is the sum of the per chain values
sum(diagnostics$num_divergent)
-[1] 124
+[1] 149
CmdStan’s diagnose utility
@@ -543,7 +544,7 @@ Create a stanfit
object
+
stanfit <- rstan::read_stan_csv(fit$output_files())
@@ -561,26 +562,26 @@ Optimization$optimize()
.
-
+
fit_mle <- mod$optimize(data = data_list, seed = 123)
Initial log joint probability = -9.51104
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
6 -5.00402 0.000103557 2.55661e-07 1 1 9
Optimization terminated normally:
Convergence detected: relative gradient magnitude is below tolerance
-Finished in 0.1 seconds.
-
+Finished in 0.2 seconds.
+
fit_mle$print() # includes lp__ (log prob calculated by Stan program)
variable estimate
lp__ -5.00
theta 0.20
-
+
fit_mle$mle("theta")
theta
0.2
Here’s a plot comparing the penalized MLE to the posterior
distribution of theta
.
-
+
@@ -591,7 +592,7 @@ OptimizationMaximum
Likelihood Estimation section of the CmdStan User’s Guide for more
details.
-
+
fit_map <- mod$optimize(
data = data_list,
jacobian = TRUE,
@@ -620,7 +621,7 @@ Laplace Approximationmode
argument. If mode
is omitted then
optimization will be run internally before taking draws from the normal
approximation.
-
+
fit_laplace <- mod$laplace(
mode = fit_map,
draws = 4000,
@@ -636,11 +637,11 @@ Laplace Approximation
-
+
fit_laplace$print("theta")
variable mean median sd mad q5 q95
theta 0.27 0.25 0.12 0.12 0.10 0.50
-
+
mcmc_hist(fit_laplace$draws("theta"), binwidth = 0.025)
@@ -651,7 +652,7 @@ Variational (ADVI)$variational()
method. For details on the ADVI algorithm see the CmdStan
User’s Guide.
-
+
fit_vb <- mod$variational(
data = data_list,
seed = 123,
@@ -662,8 +663,8 @@ Variational (ADVI)Variational (ADVI)
+
fit_vb$print("theta")
variable mean median sd mad q5 q95
theta 0.27 0.25 0.12 0.12 0.10 0.49
-
+
mcmc_hist(fit_vb$draws("theta"), binwidth = 0.025)
@@ -696,7 +697,7 @@ Variational (Pathfinder)CmdStan
User’s Guide. Pathfinder is run using the $pathfinder()
method.
-
+
fit_pf <- mod$pathfinder(
data = data_list,
seed = 123,
@@ -720,7 +721,7 @@ Variational (Pathfinder)
-
+
fit_pf$print("theta")
variable mean median sd mad q5 q95
theta 0.25 0.24 0.12 0.12 0.08 0.47
@@ -728,22 +729,22 @@ Variational (Pathfinder)
-
+
mcmc_hist(fit_pf$draws("theta"), binwidth = 0.025) +
ggplot2::labs(subtitle = "Approximate posterior from pathfinder") +
ggplot2::xlim(0, 1)
-
+
mcmc_hist(fit_vb$draws("theta"), binwidth = 0.025) +
ggplot2::labs(subtitle = "Approximate posterior from variational") +
ggplot2::xlim(0, 1)
-
+
mcmc_hist(fit_laplace$draws("theta"), binwidth = 0.025) +
ggplot2::labs(subtitle = "Approximate posterior from Laplace") +
ggplot2::xlim(0, 1)
-
+
mcmc_hist(fit$draws("theta"), binwidth = 0.025) +
ggplot2::labs(subtitle = "Posterior from MCMC") +
ggplot2::xlim(0, 1)
@@ -767,7 +768,7 @@ Saving fitted model objects
+
fit$save_object(file = "fit.RDS")
# can be read back in using readRDS
@@ -779,7 +780,7 @@ Saving fitted model objects$save_object()
and replace saveRDS
with the much faster
qsave()
function from the qs
package.
-
+
# Load CmdStan output files into the fitted model object.
fit$draws() # Load posterior draws into the object.
try(fit$sampler_diagnostics(), silent = TRUE) # Load sampler diagnostics.
@@ -795,7 +796,7 @@ Saving fitted model objects
+
# Load posterior draws into the fitted model object and omit other output.
fit$draws()
@@ -828,8 +829,8 @@ Advantages of RStanDeveloping
+CRAN. (Note: As of 2023, this can mostly be achieved with CmdStanR as
+well. See Developing
using CmdStanR.)
Avoids use of R6 classes, which may result in more familiar
syntax for many R users.
diff --git a/docs/articles/posterior.html b/docs/articles/posterior.html
index 783351c14..bf1156f81 100644
--- a/docs/articles/posterior.html
+++ b/docs/articles/posterior.html
@@ -147,80 +147,82 @@ Summary statistics
fit <- cmdstanr::cmdstanr_example("schools", method = "sample")
-Warning: 191 of 4000 (5.0%) transitions ended with a divergence.
+Warning: 411 of 4000 (10.0%) transitions ended with a divergence.
See https://mc-stan.org/misc/warnings for details.
-
+Warning: 1 of 4 chains had an E-BFMI less than 0.2.
+See https://mc-stan.org/misc/warnings for details.
+
fit$summary()
- variable mean median sd mad q5 q95
-1 lp__ -57.917364 -58.126700 5.227350 5.348035 -66.0514450 -47.99920
-2 mu 6.421661 6.560445 3.994261 3.728717 -0.1207198 13.16044
-3 tau 5.211890 4.447485 3.457118 3.180740 1.0590100 12.09968
-4 theta[1] 9.159825 8.066620 6.731183 5.516199 0.1858543 21.43202
-5 theta[2] 6.750832 6.740980 5.320603 4.835678 -1.7502315 15.66325
-6 theta[3] 5.564623 5.963075 6.485297 5.310451 -5.2589090 15.65180
-7 theta[4] 6.506969 6.552735 5.753473 4.933870 -2.8831600 15.96813
-8 theta[5] 4.602639 4.969540 5.596007 4.792030 -5.1313190 13.08000
-9 theta[6] 5.451744 5.604770 5.781909 4.976021 -4.4380795 14.88214
-10 theta[7] 9.105948 8.421645 6.077003 5.363817 0.4464001 20.13298
-11 theta[8] 6.904986 6.666570 6.591653 5.244594 -3.4154830 18.00026
- rhat ess_bulk ess_tail
-1 1.037320 87.01265 18.13542
-2 1.019548 741.86144 1129.22230
-3 1.041517 74.40670 16.64168
-4 1.012043 615.84853 1757.06290
-5 1.008696 1279.50483 2218.60618
-6 1.002604 1345.71326 1786.80529
-7 1.010044 1291.76655 1900.28317
-8 1.008882 1209.92612 1848.18547
-9 1.034876 1464.53969 1882.25434
-10 1.008780 554.66658 1685.21958
-11 1.034006 1102.79917 1784.94313
+ variable mean median sd mad q5 q95
+1 lp__ -55.581147 -56.536200 7.135791 7.809299 -66.108490 -44.17410
+2 mu 6.053657 5.516030 3.777403 3.597633 -0.119312 12.18247
+3 tau 4.456447 3.456865 3.641807 3.645828 0.778481 11.91315
+4 theta[1] 8.436941 7.287125 6.350694 4.628344 0.249281 20.38983
+5 theta[2] 6.522999 5.993620 5.308671 4.494072 -1.760367 15.64359
+6 theta[3] 5.147676 4.349235 6.014958 5.082679 -5.803791 14.17618
+7 theta[4] 6.189408 5.541310 5.578086 4.501730 -2.557880 15.63053
+8 theta[5] 4.669689 4.952550 5.338198 4.271882 -5.029484 12.96141
+9 theta[6] 5.123046 4.853110 5.623562 4.579796 -4.797084 13.70336
+10 theta[7] 8.283195 7.324155 5.703079 4.912514 1.112880 18.94623
+11 theta[8] 6.499894 5.594240 6.114406 4.839688 -2.747390 16.75831
+ rhat ess_bulk ess_tail
+1 1.348190 9.585696 NA
+2 1.094243 190.870204 910.104440
+3 1.305410 10.562073 4.833756
+4 1.037209 205.819798 1097.512010
+5 1.234963 615.265251 1158.714996
+6 1.270209 429.358164 1118.125260
+7 1.060915 288.566093 1331.398737
+8 1.265317 356.169676 1352.544578
+9 1.281493 482.412281 1311.140711
+10 1.041368 75.113061 938.699910
+11 1.069623 436.937773 1068.232198
By default all variables are summaries with the follow functions:
-
+
posterior::default_summary_measures()
[1] "mean" "median" "sd" "mad" "quantile2"
To change the variables summarized, we use the variables argument
-
+
fit$summary(variables = c("mu", "tau"))
- variable mean median sd mad q5 q95 rhat
-1 mu 6.421661 6.560445 3.994261 3.728717 -0.1207198 13.16044 1.019548
-2 tau 5.211890 4.447485 3.457118 3.180740 1.0590100 12.09968 1.041517
- ess_bulk ess_tail
-1 741.8614 1129.22230
-2 74.4067 16.64168
+ variable mean median sd mad q5 q95 rhat
+1 mu 6.053657 5.516030 3.777403 3.597633 -0.119312 12.18247 1.094243
+2 tau 4.456447 3.456865 3.641807 3.645828 0.778481 11.91315 1.305410
+ ess_bulk ess_tail
+1 190.87020 910.104440
+2 10.56207 4.833756
We can additionally change which functions are used
-
+
fit$summary(variables = c("mu", "tau"), mean, sd)
variable mean sd
-1 mu 6.421661 3.994261
-2 tau 5.211890 3.457118
+1 mu 6.053657 3.777403
+2 tau 4.456447 3.641807
To summarize all variables with non-default functions, it is
necessary to set explicitly set the variables argument, either to
NULL
or the full vector of variable names.
-
+
fit$metadata()$model_params
[1] "lp__" "mu" "tau" "theta[1]" "theta[2]" "theta[3]"
[7] "theta[4]" "theta[5]" "theta[6]" "theta[7]" "theta[8]"
-
+
fit$summary(variables = NULL, "mean", "median")
variable mean median
-1 lp__ -57.917364 -58.126700
-2 mu 6.421661 6.560445
-3 tau 5.211890 4.447485
-4 theta[1] 9.159825 8.066620
-5 theta[2] 6.750832 6.740980
-6 theta[3] 5.564623 5.963075
-7 theta[4] 6.506969 6.552735
-8 theta[5] 4.602639 4.969540
-9 theta[6] 5.451744 5.604770
-10 theta[7] 9.105948 8.421645
-11 theta[8] 6.904986 6.666570
+1 lp__ -55.581147 -56.536200
+2 mu 6.053657 5.516030
+3 tau 4.456447 3.456865
+4 theta[1] 8.436941 7.287125
+5 theta[2] 6.522999 5.993620
+6 theta[3] 5.147676 4.349235
+7 theta[4] 6.189408 5.541310
+8 theta[5] 4.669689 4.952550
+9 theta[6] 5.123046 4.853110
+10 theta[7] 8.283195 7.324155
+11 theta[8] 6.499894 5.594240
Summary functions can be specified by character string, function, or
using a formula (or anything else supported by
rlang::as_function()
). If these arguments are named, those
names will be used in the tibble output. If the summary results are
named they will take precedence.
-
+
my_sd <- function(x) c(My_SD = sd(x))
fit$summary(
c("mu", "tau"),
@@ -230,45 +232,45 @@ Summary statistics~quantile(.x, probs = c(0.1, 0.9)),
Minimum = function(x) min(x)
)
- variable MEAN median My_SD 10% 90% Minimum
-1 mu 6.421661 6.560445 3.994261 1.488318 11.54665 -15.442700
-2 tau 5.211890 4.447485 3.457118 1.488050 10.02499 0.822982
+ variable MEAN median My_SD 10% 90% Minimum
+1 mu 6.053657 5.516030 3.777403 1.565533 10.863700 -8.554010
+2 tau 4.456447 3.456865 3.641807 0.778481 9.666494 0.774844
Arguments to all summary functions can also be specified with
.args
.
-
+
- variable 2.5% 5% 95% 97.5%
-1 mu -1.441798 -0.1207198 13.16044 14.63687
-2 tau 0.822982 1.0590100 12.09968 13.78430
+ variable 2.5% 5% 95% 97.5%
+1 mu -1.614829 -0.119312 12.18247 13.54298
+2 tau 0.778481 0.778481 11.91315 13.43694
The summary functions are applied to the array of sample values, with
dimension iter_sampling
xchains
.
-
+
fit$summary(variables = NULL, dim, colMeans)
variable dim.1 dim.2 1 2 3 4
-1 lp__ 1000 4 -59.408601 -58.175641 -58.144473 -55.940741
-2 mu 1000 4 6.689529 6.327474 6.548562 6.121077
-3 tau 1000 4 6.015816 5.271415 5.222288 4.338039
-4 theta[1] 1000 4 10.309827 9.010128 9.089769 8.229576
-5 theta[2] 1000 4 6.940841 6.642238 6.917915 6.502333
-6 theta[3] 1000 4 5.378242 5.517793 5.881470 5.480988
-7 theta[4] 1000 4 6.732677 6.458448 6.658988 6.177763
-8 theta[5] 1000 4 4.460429 4.316417 4.822090 4.811620
-9 theta[6] 1000 4 5.567601 5.449356 5.743810 5.046207
-10 theta[7] 1000 4 9.872239 9.168575 9.143428 8.239549
-11 theta[8] 1000 4 6.985384 6.844136 7.146715 6.643711
+1 lp__ 1000 4 -56.698590 -58.592226 -56.911658 -50.122112
+2 mu 1000 4 6.836467 6.338743 6.214918 4.824501
+3 tau 1000 4 4.751132 5.540196 4.617587 2.916872
+4 theta[1] 1000 4 9.139180 9.470688 8.631066 6.506831
+5 theta[2] 1000 4 7.088238 6.756565 6.691301 5.555891
+6 theta[3] 1000 4 6.087235 5.430155 5.208329 3.864985
+7 theta[4] 1000 4 6.963234 6.883517 6.322756 4.588127
+8 theta[5] 1000 4 5.312623 4.530775 4.623091 4.212267
+9 theta[6] 1000 4 5.778286 4.999767 5.497782 4.216348
+10 theta[7] 1000 4 9.354323 9.367796 8.483796 5.926863
+11 theta[8] 1000 4 7.269928 7.165762 6.670007 4.893880
For this reason users may have unexpected results if they use
stats::var()
directly, as it will return a covariance
matrix. An alternative is the distributional::variance()
function, which can also be accessed via
posterior::variance()
.
-
+
variable posterior::variance ~var(as.vector(.x))
-1 mu 15.95412 15.95412
-2 tau 11.95166 11.95166
+1 mu 14.26877 14.26877
+2 tau 13.26276 13.26276
Summary functions need not be numeric, but these won’t work with
$print()
.
-
+
strict_pos <- function(x) if (all(x > 0)) "yes" else "no"
fit$summary(variables = NULL, "Strictly Positive" = strict_pos)
variable Strictly Positive
@@ -283,7 +285,7 @@ Summary statistics
+
# fit$print(variables = NULL, "Strictly Positive" = strict_pos)
For more information, see posterior::summarise_draws()
,
which is called by $summary()
.
@@ -297,49 +299,49 @@ Extracting posterior draws/samplesdraws_array
and
draws_df
formats, but the posterior
package supports other useful formats as well.
-
+
# default is a 3-D draws_array object from the posterior package
# iterations x chains x variables
draws_arr <- fit$draws() # or format="array"
str(draws_arr)
- 'draws_array' num [1:1000, 1:4, 1:11] -57.1 -58.5 -56 -57.2 -58.5 ...
+ 'draws_array' num [1:1000, 1:4, 1:11] -61.7 -60.5 -61.8 -60.5 -66.8 ...
- attr(*, "dimnames")=List of 3
..$ iteration: chr [1:1000] "1" "2" "3" "4" ...
..$ chain : chr [1:4] "1" "2" "3" "4"
..$ variable : chr [1:11] "lp__" "mu" "tau" "theta[1]" ...
-
+
# draws x variables data frame
draws_df <- fit$draws(format = "df")
str(draws_df)
draws_df [4,000 × 14] (S3: draws_df/draws/tbl_df/tbl/data.frame)
- $ lp__ : num [1:4000] -57.1 -58.5 -56 -57.2 -58.5 ...
- $ mu : num [1:4000] 9.17 4.62 11.15 5.67 5.37 ...
- $ tau : num [1:4000] 2.8 4.94 2.62 5.14 7.06 ...
- $ theta[1] : num [1:4000] 17.589 0.16 18.328 0.237 1.688 ...
- $ theta[2] : num [1:4000] 8.55 10.22 8.37 9.18 9.6 ...
- $ theta[3] : num [1:4000] 10.75 6.36 10.37 9.1 8.14 ...
- $ theta[4] : num [1:4000] 10.85 3.4 12.92 6.16 6.3 ...
- $ theta[5] : num [1:4000] 11 2.25 11.42 2.25 2.76 ...
- $ theta[6] : num [1:4000] 9.55 8.19 9.94 6.84 4.9 ...
- $ theta[7] : num [1:4000] 6.58 14.62 9.12 6.07 5.08 ...
- $ theta[8] : num [1:4000] 11.31 6.14 10.26 4.92 7.66 ...
+ $ lp__ : num [1:4000] -61.7 -60.5 -61.8 -60.5 -66.8 ...
+ $ mu : num [1:4000] 8.86 6.18 9.7 4.97 5.16 ...
+ $ tau : num [1:4000] 5.6 8.77 7.58 7.37 11.97 ...
+ $ theta[1] : num [1:4000] 16.716 14.062 6.67 6.25 -0.404 ...
+ $ theta[2] : num [1:4000] 4.377 6.173 15.608 0.638 10.449 ...
+ $ theta[3] : num [1:4000] 11.59 9.27 11.11 3.74 13.42 ...
+ $ theta[4] : num [1:4000] 13.68 12.51 7.77 6.48 10.16 ...
+ $ theta[5] : num [1:4000] -0.877 1.959 7.197 2.097 3.229 ...
+ $ theta[6] : num [1:4000] -5.02 -4.95 5.66 5.24 14.26 ...
+ $ theta[7] : num [1:4000] 13.38 17.44 13.69 6.65 13.77 ...
+ $ theta[8] : num [1:4000] 10.46 5.48 -6.15 20.92 31.79 ...
$ .chain : int [1:4000] 1 1 1 1 1 1 1 1 1 1 ...
$ .iteration: int [1:4000] 1 2 3 4 5 6 7 8 9 10 ...
$ .draw : int [1:4000] 1 2 3 4 5 6 7 8 9 10 ...
-
+
print(draws_df)
# A draws_df: 1000 iterations, 4 chains, and 11 variables
- lp__ mu tau theta[1] theta[2] theta[3] theta[4] theta[5]
-1 -57 9.17 2.8 17.59 8.5 10.75 10.8 11.0
-2 -58 4.62 4.9 0.16 10.2 6.36 3.4 2.3
-3 -56 11.15 2.6 18.33 8.4 10.37 12.9 11.4
-4 -57 5.67 5.1 0.24 9.2 9.10 6.2 2.3
-5 -59 5.37 7.1 1.69 9.6 8.14 6.3 2.8
-6 -59 0.64 4.4 6.20 6.6 0.44 4.1 2.4
-7 -53 7.85 3.0 6.58 6.7 8.34 7.4 6.7
-8 -54 8.05 3.9 7.66 6.5 4.54 7.1 8.3
-9 -54 6.80 3.3 7.75 8.5 1.37 6.6 9.4
-10 -59 5.09 5.8 0.40 9.4 -1.92 13.0 2.4
+ lp__ mu tau theta[1] theta[2] theta[3] theta[4] theta[5]
+1 -62 8.9 5.6 16.7 4.38 11.6 13.676 -0.88
+2 -61 6.2 8.8 14.1 6.17 9.3 12.515 1.96
+3 -62 9.7 7.6 6.7 15.61 11.1 7.770 7.20
+4 -60 5.0 7.4 6.3 0.64 3.7 6.477 2.10
+5 -67 5.2 12.0 -0.4 10.45 13.4 10.162 3.23
+6 -63 11.1 7.9 24.6 11.68 18.8 -1.606 3.79
+7 -61 14.7 6.1 28.9 11.15 15.3 6.780 9.95
+8 -63 13.4 5.7 13.7 21.03 7.2 20.051 12.99
+9 -64 16.0 8.3 20.2 2.65 11.3 19.000 3.51
+10 -59 2.9 4.5 4.2 11.37 2.5 -0.057 6.30
# ... with 3990 more draws, and 3 more variables
# ... hidden reserved variables {'.chain', '.iteration', '.draw'}
To convert an existing draws object to a different format use the
diff --git a/docs/articles/profiling.html b/docs/articles/profiling.html
index 613e6d866..dfbed9b18 100644
--- a/docs/articles/profiling.html
+++ b/docs/articles/profiling.html
@@ -250,11 +250,11 @@
Accessing the profiling info
fit$profiles()
[[1]]
name thread_id total_time forward_time reverse_time chain_stack
-1 likelihood 0x10cc54e00 0.76348000 0.62696000 0.13652000 51132
-2 priors 0x10cc54e00 0.00513667 0.00296958 0.00216709 34088
+1 likelihood 0x118759e00 0.69970800 0.57529800 0.12441000 51468
+2 priors 0x118759e00 0.00446571 0.00270154 0.00176417 34312
no_chain_stack autodiff_calls no_autodiff_calls
-1 34105044 17044 1
-2 34088 17044 1
+1 34329156 17156 1
+2 34312 17156 1
The total_time
column is the total time spent inside a
given profile statement. It is clear that the vast majority of time is
spent in the likelihood function.
@@ -297,11 +297,11 @@ Comparing to a faster versio
fit_glm$profiles()
[[1]]
name thread_id total_time forward_time reverse_time chain_stack
-1 likelihood 0x115a87e00 0.39845200 0.39713500 0.00131726 49845
-2 priors 0x115a87e00 0.00381033 0.00234721 0.00146311 33230
+1 likelihood 0x106ce4e00 0.38400000 0.38264800 0.00135175 52203
+2 priors 0x106ce4e00 0.00356564 0.00237053 0.00119511 34802
no_chain_stack autodiff_calls no_autodiff_calls
-1 16615 16615 1
-2 33230 16615 1
+1 17401 17401 1
+2 34802 17401 1
We can see from the total_time
column that this is much
faster than the previous model.
@@ -324,7 +324,7 @@ Per-gradient timings, and memory
profile_chain_1 <- fit$profiles()[[1]]
per_gradient_timing <- profile_chain_1$total_time/profile_chain_1$autodiff_calls
print(per_gradient_timing) # two elements for the two profile statements in the model
-[1] 4.479465e-05 3.013770e-07
+[1] 4.078503e-05 2.603002e-07
Accessing and saving the profile files
@@ -335,7 +335,7 @@ Accessing and saving the profile
$profile_files()
.
fit$profile_files()
-[1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpI4doTK/model_6580008f67848265f3dfd0e7ae3b0600-profile-202311081036-1-4a8018.csv"
+[1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpJRtaoq/model_6580008f67848265f3dfd0e7ae3b0600-profile-202312131010-1-95e407.csv"
These can be saved to a more permanent location with the
$save_profile_files()
method.
diff --git a/docs/index.html b/docs/index.html
index cc3f76986..1e06b71ed 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -156,7 +156,7 @@ Goals
A clean interface to Stan services so that CmdStanR can keep up with Stan releases.
R code that doesn’t interface directly with C++, only calls compiled executables.
Modularity: CmdStanR runs Stan’s algorithms and lets downstream modules do the analysis.
-Flexible BSD-3 license.
+Flexible BSD-3 license.
@@ -191,7 +191,7 @@ License
CmdStanR, like CmdStan and the core Stan C++ code, is licensed under the following licenses:
-- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
+- Code: BSD 3-clause (https://opensource.org/license/bsd-3-clause/)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
@@ -216,6 +216,12 @@ License
+
+Community
+
+
Citation
diff --git a/docs/news/index.html b/docs/news/index.html
index 64016e370..4dbb505ff 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -312,7 +312,7 @@ Bug fixes
New features
-CSV reading is now faster by using data.table::fread()
. (#318)
+CSV reading is now faster by using data.table::fread()
. (#318)
install_cmdstan()
gains argument version
for specifying which version of CmdStan to install. (#300, #308)
New function check_cmdstan_toolchain()
that checks if the appropriate toolchains are available. (#289)
$sample()
method for CmdStanModel objects gains argument chain_ids
for specifying custom chain IDs. (#319)
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 2af8a222e..14ff6a178 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -8,7 +8,7 @@ articles:
posterior: posterior.html
profiling: profiling.html
r-markdown: r-markdown.html
-last_built: 2023-11-08T17:25Z
+last_built: 2023-12-13T17:00Z
urls:
reference: https://mc-stan.org/cmdstanr/reference
article: https://mc-stan.org/cmdstanr/articles
diff --git a/docs/reference/CmdStanDiagnose.html b/docs/reference/CmdStanDiagnose.html
index 18388338f..e0d66d56d 100644
--- a/docs/reference/CmdStanDiagnose.html
+++ b/docs/reference/CmdStanDiagnose.html
@@ -138,10 +138,10 @@ Examples
# retrieve the gradients
test$gradients()
#> param_idx value model finite_diff error
-#> 1 0 0.797265 -8.06234 -8.06234 -9.72013e-09
-#> 2 1 0.216729 -15.64540 -15.64540 1.12721e-08
-#> 3 2 -0.207005 -4.61097 -4.61097 -5.25634e-09
-#> 4 3 1.118110 -6.60883 -6.60883 -2.24051e-08
+#> 1 0 -1.501560 34.56550 34.56550 4.58586e-08
+#> 2 1 -1.199130 1.69981 1.69981 -1.08299e-09
+#> 3 2 1.255420 -23.66640 -23.66640 -2.23140e-08
+#> 4 3 -0.452023 12.80740 12.80740 -8.57077e-09
# }
diff --git a/docs/reference/CmdStanGQ.html b/docs/reference/CmdStanGQ.html
index 28c7f7a4c..6506d9afc 100644
--- a/docs/reference/CmdStanGQ.html
+++ b/docs/reference/CmdStanGQ.html
@@ -177,7 +177,7 @@ Examples
#>
#> All 4 chains finished successfully.
#> Mean chain execution time: 0.0 seconds.
-#> Total execution time: 0.6 seconds.
+#> Total execution time: 0.7 seconds.
#>
# stan program for standalone generated quantities
diff --git a/docs/reference/CmdStanModel.html b/docs/reference/CmdStanModel.html
index a309a128d..6b2ba8d72 100644
--- a/docs/reference/CmdStanModel.html
+++ b/docs/reference/CmdStanModel.html
@@ -333,7 +333,7 @@ Examples
#> 6 -5.00402 0.000103557 2.55661e-07 1 1 9
#> Optimization terminated normally:
#> Convergence detected: relative gradient magnitude is below tolerance
-#> Finished in 0.1 seconds.
+#> Finished in 0.2 seconds.
fit_optim$summary()
#> # A tibble: 2 × 2
#> variable estimate
@@ -341,12 +341,12 @@ Examples
#> 1 lp__ -5.00
#> 2 theta 0.2
-# Run 'optimize' again with 'jacobian=TRUE' and then draw from laplace approximation
+# Run 'optimize' again with 'jacobian=TRUE' and then draw from Laplace approximation
# to the posterior
fit_optim <- mod$optimize(data = my_data_file, jacobian = TRUE)
-#> Initial log joint probability = -6.94684
+#> Initial log joint probability = -6.92942
#> Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
-#> 4 -6.74802 0.000319208 6.44211e-05 0.9206 0.9206 7
+#> 4 -6.74802 0.000269426 5.11368e-05 0.9249 0.9249 7
#> Optimization terminated normally:
#> Convergence detected: relative gradient magnitude is below tolerance
#> Finished in 0.1 seconds.
@@ -377,11 +377,11 @@ Examples
#> Finished in 0.1 seconds.
fit_laplace$summary()
#> # A tibble: 3 × 7
-#> variable mean median sd mad q5 q95
-#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -7.23 -6.96 0.692 0.298 -8.50 -6.75
-#> 2 lp_approx__ -0.490 -0.226 0.691 0.313 -1.88 -0.00180
-#> 3 theta 0.267 0.249 0.122 0.119 0.102 0.497
+#> variable mean median sd mad q5 q95
+#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 lp__ -7.22 -6.97 0.652 0.296 -8.51 -6.75
+#> 2 lp_approx__ -0.492 -0.223 0.677 0.302 -1.91 -0.00222
+#> 3 theta 0.265 0.246 0.120 0.122 0.0952 0.484
# Run 'variational' method to use ADVI to approximate posterior
fit_vb <- mod$variational(data = stan_data, seed = 123)
@@ -450,6 +450,53 @@ Examples
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
+# Run 'pathfinder' again with more paths, fewer draws per path,
+# better covariance approximation, and fewer LBFGSs iterations
+fit_pf <- mod$pathfinder(data = stan_data, num_paths=10, single_path_draws=40,
+ history_size=50, max_lbfgs_iters=100)
+#> Path [1] :Initial log joint density = -6.860971
+#> Path [1] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 4 -6.748e+00 7.999e-04 6.710e-06 1.000e+00 1.000e+00 101 -6.266e+00 -6.266e+00
+#> Path [1] :Best Iter: [2] ELBO (-6.159468) evaluations: (101)
+#> Path [2] :Initial log joint density = -15.050783
+#> Path [2] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 2.035e-03 6.058e-05 1.000e+00 1.000e+00 126 -6.231e+00 -6.231e+00
+#> Path [2] :Best Iter: [2] ELBO (-6.179167) evaluations: (126)
+#> Path [3] :Initial log joint density = -12.609181
+#> Path [3] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.519e-03 3.222e-05 1.000e+00 1.000e+00 126 -6.224e+00 -6.224e+00
+#> Path [3] :Best Iter: [3] ELBO (-6.177380) evaluations: (126)
+#> Path [4] :Initial log joint density = -7.551395
+#> Path [4] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.242e-04 5.362e-07 1.000e+00 1.000e+00 126 -6.267e+00 -6.267e+00
+#> Path [4] :Best Iter: [4] ELBO (-6.163367) evaluations: (126)
+#> Path [5] :Initial log joint density = -7.623161
+#> Path [5] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.410e-04 6.577e-07 1.000e+00 1.000e+00 126 -6.242e+00 -6.242e+00
+#> Path [5] :Best Iter: [5] ELBO (-6.241791) evaluations: (126)
+#> Path [6] :Initial log joint density = -12.604877
+#> Path [6] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.517e-03 3.214e-05 1.000e+00 1.000e+00 126 -6.220e+00 -6.220e+00
+#> Path [6] :Best Iter: [4] ELBO (-6.150438) evaluations: (126)
+#> Path [7] :Initial log joint density = -6.754804
+#> Path [7] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 3 -6.748e+00 1.079e-03 3.589e-05 1.000e+00 1.000e+00 76 -6.230e+00 -6.230e+00
+#> Path [7] :Best Iter: [2] ELBO (-6.228353) evaluations: (76)
+#> Path [8] :Initial log joint density = -6.839688
+#> Path [8] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 4 -6.748e+00 6.089e-04 4.257e-06 1.000e+00 1.000e+00 101 -6.279e+00 -6.279e+00
+#> Path [8] :Best Iter: [3] ELBO (-6.230942) evaluations: (101)
+#> Path [9] :Initial log joint density = -7.590990
+#> Path [9] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.335e-04 6.020e-07 1.000e+00 1.000e+00 126 -6.260e+00 -6.260e+00
+#> Path [9] :Best Iter: [4] ELBO (-6.210494) evaluations: (126)
+#> Path [10] :Initial log joint density = -11.878141
+#> Path [10] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.194e-03 2.066e-05 1.000e+00 1.000e+00 126 -6.255e+00 -6.255e+00
+#> Path [10] :Best Iter: [2] ELBO (-6.222876) evaluations: (126)
+#> Total log probability function evaluations:1310
+#> Finished in 0.1 seconds.
+
# Specifying initial values as a function
fit_mcmc_w_init_fun <- mod$sample(
data = stan_data,
@@ -516,7 +563,7 @@ Examples
#>
#> Both chains finished successfully.
#> Mean chain execution time: 0.0 seconds.
-#> Total execution time: 0.4 seconds.
+#> Total execution time: 0.3 seconds.
#>
fit_optim_w_init_list <- mod$optimize(
data = stan_data,
diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png
index 6823093a50447db6ee651a92b3785b9e33069224..17a358060aed2a86950757bbd25c6f92c08c458f 100644
GIT binary patch
literal 1011
zcmeAS@N?(olHy`uVBq!ia0y~yV0-|=9Be?5+AI5}0x7m6Z+90U4Fo@(ch>_c&H|6f
zVg?3oArNM~bhqvg0|WD9PZ!6KiaBo&GBN^{G%5UFpXcEKVvd5*5Eu=C0SJK)8A6*F
U7`aXvEC5;V>FVdQ&MBb@00SN#Z2$lO
literal 5039
zcmc&&3sjP6xBj%!O3g0+q-DmOlb88_ODzm16{)5)O0>yFGw-J{
z0KN4~msVFFP6YrPJm3fR9Z$}m?n}FL=X?tH-9VakC3vK-hdeD!<@O|G<>Z{~{eI)c
z1D;lq+FjwttbML5u512$|LXM@O>cS~Jb3-$$vfYS@FJI=IkN8Tq31uEF|HqcZ)l?Z
z{oc=t1|h}o&UU*;C5=eKO2HUbiXwzQ`E7k((yj<9iNbb0IUUJza?F)cD589Meu{_o
zFTrZwnvY9u7PWzHX7w4VC9#({it_AV0njh)lWN=FOH%D;r1iEV`~^3ISq<|+n8?kJ
zT4ix7XRqoD#3st|cvo(%H(PMcOzs|R4nWpw6%a@`7bQI+kXsA3N{QR71j@?i?im4@
z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em|fWUxn0qkaTFAzeV=
zC)S6>xDss46}~0fQ2PF4@wz1w{Gj^*+Ww&L{t3L(Ss?%b
diff --git a/docs/reference/as_draws.CmdStanMCMC.html b/docs/reference/as_draws.CmdStanMCMC.html
index 40958e24a..ab9c18eca 100644
--- a/docs/reference/as_draws.CmdStanMCMC.html
+++ b/docs/reference/as_draws.CmdStanMCMC.html
@@ -158,41 +158,41 @@ Examples
#>
#> chain
#> iteration 1 2 3 4
-#> 1 -66 -68 -66 -65
-#> 2 -65 -67 -65 -66
-#> 3 -68 -66 -65 -66
-#> 4 -68 -65 -65 -67
-#> 5 -67 -64 -65 -67
+#> 1 -66 -67 -65 -67
+#> 2 -65 -65 -64 -67
+#> 3 -66 -66 -65 -64
+#> 4 -65 -65 -65 -66
+#> 5 -67 -67 -66 -65
#>
#> , , variable = alpha
#>
#> chain
#> iteration 1 2 3 4
-#> 1 0.44 0.414 0.71 0.46
-#> 2 0.30 -0.045 0.44 0.17
-#> 3 0.65 0.397 0.14 0.55
-#> 4 0.29 0.644 0.47 0.54
-#> 5 0.53 0.435 0.48 0.20
+#> 1 0.37 0.0232 0.30 0.19
+#> 2 0.35 0.1359 0.50 0.56
+#> 3 0.39 0.0021 0.22 0.42
+#> 4 0.42 0.2264 0.22 0.21
+#> 5 0.30 0.6367 0.19 0.24
#>
#> , , variable = beta[1]
#>
#> chain
#> iteration 1 2 3 4
-#> 1 -0.91 -0.17 -0.50 -0.59
-#> 2 -0.57 -0.97 -0.78 -0.65
-#> 3 -0.90 -0.28 -0.38 -0.43
-#> 4 -1.20 -0.58 -0.92 -1.04
-#> 5 -0.59 -0.74 -0.70 -0.98
+#> 1 -0.21 -0.70 -0.87 -0.93
+#> 2 -0.42 -0.81 -0.58 -0.38
+#> 3 -1.01 -0.83 -0.81 -0.49
+#> 4 -0.95 -0.45 -0.67 -1.03
+#> 5 -0.16 -0.96 -0.73 -0.89
#>
#> , , variable = beta[2]
#>
#> chain
-#> iteration 1 2 3 4
-#> 1 0.088 -0.192 -0.43 -0.621
-#> 2 -0.515 -0.088 -0.35 -0.591
-#> 3 -0.031 -0.444 -0.11 0.017
-#> 4 -0.653 -0.229 -0.37 0.066
-#> 5 -0.345 -0.277 -0.13 -0.678
+#> iteration 1 2 3 4
+#> 1 -0.3841 0.08 -0.574 -0.73
+#> 2 -0.2843 -0.27 -0.376 0.12
+#> 3 -0.0223 -0.13 -0.065 -0.11
+#> 4 0.0016 -0.28 -0.100 -0.29
+#> 5 -0.5327 -0.66 -0.644 -0.16
#>
#> # ... with 995 more iterations, and 101 more variables
@@ -200,70 +200,71 @@ Examples
posterior::as_draws_rvars(fit)
#> # A draws_rvars: 1000 iterations, 4 chains, and 4 variables
#> $lp__: rvar<1000,4>[1] mean ± sd:
-#> [1] -66 ± 1.5
+#> [1] -66 ± 1.4
#>
#> $alpha: rvar<1000,4>[1] mean ± sd:
-#> [1] 0.38 ± 0.22
+#> [1] 0.37 ± 0.22
#>
#> $beta: rvar<1000,4>[3] mean ± sd:
-#> [1] -0.67 ± 0.26 -0.27 ± 0.23 0.69 ± 0.27
+#> [1] -0.66 ± 0.25 -0.27 ± 0.23 0.67 ± 0.26
#>
#> $log_lik: rvar<1000,4>[100] mean ± sd:
-#> [1] -0.517 ± 0.098 -0.401 ± 0.152 -0.501 ± 0.223 -0.448 ± 0.154
-#> [5] -1.185 ± 0.289 -0.590 ± 0.195 -0.640 ± 0.126 -0.278 ± 0.135
-#> [9] -0.693 ± 0.170 -0.742 ± 0.238 -0.279 ± 0.127 -0.494 ± 0.244
-#> [13] -0.659 ± 0.215 -0.363 ± 0.176 -0.279 ± 0.108 -0.275 ± 0.087
-#> [17] -1.593 ± 0.288 -0.479 ± 0.107 -0.232 ± 0.076 -0.113 ± 0.080
-#> [21] -0.211 ± 0.089 -0.568 ± 0.149 -0.330 ± 0.140 -0.136 ± 0.067
-#> [25] -0.454 ± 0.123 -1.517 ± 0.342 -0.306 ± 0.123 -0.445 ± 0.083
-#> [29] -0.725 ± 0.232 -0.696 ± 0.191 -0.487 ± 0.164 -0.423 ± 0.109
-#> [33] -0.409 ± 0.130 -0.064 ± 0.052 -0.587 ± 0.189 -0.325 ± 0.132
-#> [37] -0.700 ± 0.231 -0.312 ± 0.151 -0.180 ± 0.111 -0.681 ± 0.128
-#> [41] -1.133 ± 0.258 -0.932 ± 0.200 -0.416 ± 0.265 -1.175 ± 0.185
-#> [45] -0.360 ± 0.118 -0.580 ± 0.131 -0.303 ± 0.131 -0.324 ± 0.082
-#> [49] -0.319 ± 0.079 -1.285 ± 0.333 -0.289 ± 0.094 -0.832 ± 0.142
-#> [53] -0.401 ± 0.131 -0.373 ± 0.143 -0.384 ± 0.139 -0.321 ± 0.192
-#> [57] -0.658 ± 0.119 -0.951 ± 0.363 -1.364 ± 0.348 -0.976 ± 0.158
-#> [61] -0.542 ± 0.097 -0.871 ± 0.318 -0.116 ± 0.075 -0.901 ± 0.250
-#> [65] -2.026 ± 0.610 -0.508 ± 0.138 -0.276 ± 0.082 -1.061 ± 0.237
-#> [69] -0.435 ± 0.083 -0.641 ± 0.235 -0.613 ± 0.214 -0.464 ± 0.177
-#> [73] -1.489 ± 0.374 -0.948 ± 0.198 -1.136 ± 0.394 -0.374 ± 0.140
-#> [77] -0.878 ± 0.139 -0.491 ± 0.174 -0.765 ± 0.194 -0.539 ± 0.200
-#> [81] -0.163 ± 0.102 -0.223 ± 0.145 -0.343 ± 0.080 -0.275 ± 0.092
-#> [85] -0.130 ± 0.075 -1.132 ± 0.322 -0.822 ± 0.126 -0.780 ± 0.249
-#> [89] -1.283 ± 0.323 -0.261 ± 0.137 -0.387 ± 0.133 -1.501 ± 0.352
-#> [93] -0.737 ± 0.221 -0.318 ± 0.087 -0.388 ± 0.112 -1.573 ± 0.284
-#> [97] -0.432 ± 0.100 -1.053 ± 0.383 -0.693 ± 0.143 -0.392 ± 0.096
+#> [1] -0.518 ± 0.099 -0.405 ± 0.147 -0.501 ± 0.220 -0.451 ± 0.153
+#> [5] -1.173 ± 0.276 -0.592 ± 0.185 -0.640 ± 0.123 -0.280 ± 0.135
+#> [9] -0.693 ± 0.163 -0.740 ± 0.234 -0.283 ± 0.124 -0.500 ± 0.241
+#> [13] -0.655 ± 0.206 -0.364 ± 0.175 -0.282 ± 0.106 -0.278 ± 0.087
+#> [17] -1.582 ± 0.288 -0.481 ± 0.107 -0.235 ± 0.076 -0.115 ± 0.079
+#> [21] -0.215 ± 0.088 -0.570 ± 0.144 -0.332 ± 0.140 -0.139 ± 0.067
+#> [25] -0.456 ± 0.121 -1.513 ± 0.345 -0.309 ± 0.120 -0.447 ± 0.083
+#> [29] -0.722 ± 0.227 -0.694 ± 0.189 -0.489 ± 0.157 -0.427 ± 0.106
+#> [33] -0.412 ± 0.126 -0.065 ± 0.052 -0.585 ± 0.184 -0.327 ± 0.135
+#> [37] -0.700 ± 0.227 -0.314 ± 0.150 -0.182 ± 0.110 -0.681 ± 0.126
+#> [41] -1.124 ± 0.248 -0.928 ± 0.195 -0.412 ± 0.267 -1.169 ± 0.185
+#> [45] -0.362 ± 0.119 -0.583 ± 0.128 -0.307 ± 0.129 -0.327 ± 0.084
+#> [49] -0.322 ± 0.079 -1.286 ± 0.334 -0.291 ± 0.096 -0.833 ± 0.144
+#> [53] -0.404 ± 0.127 -0.373 ± 0.143 -0.388 ± 0.134 -0.322 ± 0.195
+#> [57] -0.658 ± 0.117 -0.951 ± 0.353 -1.351 ± 0.337 -0.975 ± 0.159
+#> [61] -0.542 ± 0.099 -0.876 ± 0.314 -0.119 ± 0.075 -0.901 ± 0.247
+#> [65] -1.995 ± 0.581 -0.511 ± 0.134 -0.279 ± 0.083 -1.057 ± 0.233
+#> [69] -0.438 ± 0.083 -0.638 ± 0.235 -0.609 ± 0.207 -0.463 ± 0.169
+#> [73] -1.476 ± 0.363 -0.944 ± 0.194 -1.139 ± 0.389 -0.376 ± 0.140
+#> [77] -0.875 ± 0.136 -0.489 ± 0.174 -0.764 ± 0.190 -0.545 ± 0.196
+#> [81] -0.165 ± 0.100 -0.226 ± 0.138 -0.346 ± 0.081 -0.278 ± 0.091
+#> [85] -0.132 ± 0.075 -1.120 ± 0.315 -0.822 ± 0.127 -0.773 ± 0.237
+#> [89] -1.270 ± 0.314 -0.263 ± 0.136 -0.388 ± 0.129 -1.484 ± 0.335
+#> [93] -0.738 ± 0.218 -0.321 ± 0.088 -0.391 ± 0.110 -1.562 ± 0.280
+#> [97] -0.433 ± 0.102 -1.052 ± 0.372 -0.693 ± 0.139 -0.393 ± 0.098
#>
posterior::as_draws_list(fit)
#> # A draws_list: 1000 iterations, 4 chains, and 105 variables
#>
#> [chain = 1]
#> $lp__
-#> [1] -66 -65 -68 -68 -67 -66 -65 -66 -67 -66
+#> [1] -66 -65 -66 -65 -67 -65 -65 -64 -67 -69
#>
#> $alpha
-#> [1] 0.44 0.30 0.65 0.29 0.53 0.53 0.47 0.38 0.32 0.51
+#> [1] 0.373 0.355 0.389 0.419 0.300 0.178 0.629 0.288 0.016 -0.075
#>
#> $`beta[1]`
-#> [1] -0.91 -0.57 -0.90 -1.20 -0.59 -0.51 -0.36 -0.19 -1.17 -1.02
+#> [1] -0.21 -0.42 -1.01 -0.95 -0.16 -0.51 -0.69 -0.67 -0.74 -0.71
#>
#> $`beta[2]`
-#> [1] 0.088 -0.515 -0.031 -0.653 -0.345 -0.646 -0.154 -0.488 -0.013 0.034
+#> [1] -0.3841 -0.2843 -0.0223 0.0016 -0.5327 -0.3040 -0.3392 -0.2792 0.0976
+#> [10] 0.1916
#>
#>
#> [chain = 2]
#> $lp__
-#> [1] -68 -67 -66 -65 -64 -65 -65 -64 -65 -65
+#> [1] -67 -65 -66 -65 -67 -67 -67 -64 -68 -66
#>
#> $alpha
-#> [1] 0.414 -0.045 0.397 0.644 0.435 0.266 0.415 0.369 0.229 0.185
+#> [1] 0.0232 0.1359 0.0021 0.2264 0.6367 0.7152 0.4707 0.3940 0.0634 0.4544
#>
#> $`beta[1]`
-#> [1] -0.17 -0.97 -0.28 -0.58 -0.74 -0.48 -0.83 -0.72 -0.44 -0.58
+#> [1] -0.70 -0.81 -0.83 -0.45 -0.96 -0.34 -1.17 -0.57 -0.62 -0.62
#>
#> $`beta[2]`
-#> [1] -0.192 -0.088 -0.444 -0.229 -0.277 -0.314 0.046 -0.240 -0.080 -0.090
+#> [1] 0.08 -0.27 -0.13 -0.28 -0.66 -0.57 -0.21 -0.20 -0.47 -0.67
#>
#> # ... with 990 more iterations, and 2 more chains, and 101 more variables
# }
diff --git a/docs/reference/cmdstan_model.html b/docs/reference/cmdstan_model.html
index 9385aa48c..a94e571ba 100644
--- a/docs/reference/cmdstan_model.html
+++ b/docs/reference/cmdstan_model.html
@@ -358,12 +358,12 @@ Examples
#> 1 lp__ -5.00
#> 2 theta 0.2
-# Run 'optimize' again with 'jacobian=TRUE' and then draw from laplace approximation
+# Run 'optimize' again with 'jacobian=TRUE' and then draw from Laplace approximation
# to the posterior
fit_optim <- mod$optimize(data = my_data_file, jacobian = TRUE)
-#> Initial log joint probability = -6.79903
+#> Initial log joint probability = -17.5452
#> Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
-#> 3 -6.74802 0.00379849 4.77236e-05 0.9516 0.9516 6
+#> 5 -6.74802 0.00115356 2.90728e-05 1 1 8
#> Optimization terminated normally:
#> Convergence detected: relative gradient magnitude is below tolerance
#> Finished in 0.1 seconds.
@@ -394,11 +394,11 @@ Examples
#> Finished in 0.1 seconds.
fit_laplace$summary()
#> # A tibble: 3 × 7
-#> variable mean median sd mad q5 q95
-#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -7.22 -6.97 0.659 0.305 -8.52 -6.75
-#> 2 lp_approx__ -0.481 -0.224 0.662 0.308 -1.84 -0.00186
-#> 3 theta 0.272 0.252 0.121 0.122 0.103 0.502
+#> variable mean median sd mad q5 q95
+#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 lp__ -7.27 -7.00 0.705 0.338 -8.72 -6.75
+#> 2 lp_approx__ -0.527 -0.251 0.714 0.340 -2.02 -0.00142
+#> 3 theta 0.270 0.251 0.126 0.125 0.0959 0.509
# Run 'variational' method to use ADVI to approximate posterior
fit_vb <- mod$variational(data = stan_data, seed = 123)
@@ -407,8 +407,8 @@ Examples
#> This procedure has not been thoroughly tested and may be unstable
#> or buggy. The interface is subject to change.
#> ------------------------------------------------------------
-#> Gradient evaluation took 6e-06 seconds
-#> 1000 transitions using 10 leapfrog steps per transition would take 0.06 seconds.
+#> Gradient evaluation took 5e-06 seconds
+#> 1000 transitions using 10 leapfrog steps per transition would take 0.05 seconds.
#> Adjust your expectations accordingly!
#> Begin eta adaptation.
#> Iteration: 1 / 250 [ 0%] (Adaptation)
@@ -467,6 +467,53 @@ Examples
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
+# Run 'pathfinder' again with more paths, fewer draws per path,
+# better covariance approximation, and fewer LBFGSs iterations
+fit_pf <- mod$pathfinder(data = stan_data, num_paths=10, single_path_draws=40,
+ history_size=50, max_lbfgs_iters=100)
+#> Path [1] :Initial log joint density = -11.515672
+#> Path [1] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.064e-03 1.692e-05 1.000e+00 1.000e+00 126 -6.254e+00 -6.254e+00
+#> Path [1] :Best Iter: [3] ELBO (-6.213658) evaluations: (126)
+#> Path [2] :Initial log joint density = -9.189304
+#> Path [2] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 3.749e-04 3.327e-06 1.000e+00 1.000e+00 126 -6.289e+00 -6.289e+00
+#> Path [2] :Best Iter: [4] ELBO (-6.214534) evaluations: (126)
+#> Path [3] :Initial log joint density = -13.270061
+#> Path [3] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.767e-03 4.305e-05 1.000e+00 1.000e+00 126 -6.276e+00 -6.276e+00
+#> Path [3] :Best Iter: [3] ELBO (-6.225363) evaluations: (126)
+#> Path [4] :Initial log joint density = -6.748213
+#> Path [4] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 2 -6.748e+00 1.004e-02 7.315e-05 1.000e+00 1.000e+00 51 -6.200e+00 -6.200e+00
+#> Path [4] :Best Iter: [2] ELBO (-6.200114) evaluations: (51)
+#> Path [5] :Initial log joint density = -7.368682
+#> Path [5] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 5.377e-04 9.870e-07 1.000e+00 1.000e+00 126 -6.276e+00 -6.276e+00
+#> Path [5] :Best Iter: [3] ELBO (-6.167297) evaluations: (126)
+#> Path [6] :Initial log joint density = -9.465368
+#> Path [6] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 4.613e-04 4.599e-06 1.000e+00 1.000e+00 126 -6.238e+00 -6.238e+00
+#> Path [6] :Best Iter: [3] ELBO (-6.185454) evaluations: (126)
+#> Path [7] :Initial log joint density = -6.856712
+#> Path [7] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 4 -6.748e+00 1.028e-04 1.386e-05 9.452e-01 9.452e-01 101 -6.242e+00 -6.242e+00
+#> Path [7] :Best Iter: [3] ELBO (-6.159687) evaluations: (101)
+#> Path [8] :Initial log joint density = -7.085030
+#> Path [8] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 4 -6.748e+00 3.058e-03 6.268e-05 1.000e+00 1.000e+00 101 -6.221e+00 -6.221e+00
+#> Path [8] :Best Iter: [4] ELBO (-6.221460) evaluations: (101)
+#> Path [9] :Initial log joint density = -7.443992
+#> Path [9] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 9.951e-05 3.747e-07 1.000e+00 1.000e+00 126 -6.228e+00 -6.228e+00
+#> Path [9] :Best Iter: [2] ELBO (-6.206717) evaluations: (126)
+#> Path [10] :Initial log joint density = -6.751684
+#> Path [10] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 3 -6.748e+00 5.950e-04 1.461e-05 1.000e+00 1.000e+00 76 -6.209e+00 -6.209e+00
+#> Path [10] :Best Iter: [3] ELBO (-6.209430) evaluations: (76)
+#> Total log probability function evaluations:1235
+#> Finished in 0.1 seconds.
+
# Specifying initial values as a function
fit_mcmc_w_init_fun <- mod$sample(
data = stan_data,
diff --git a/docs/reference/cmdstanr-package.html b/docs/reference/cmdstanr-package.html
index 6e29914b9..072311bb7 100644
--- a/docs/reference/cmdstanr-package.html
+++ b/docs/reference/cmdstanr-package.html
@@ -291,7 +291,7 @@ Examples
#> [1] 0 0
#>
#> $ebfmi
-#> [1] 1.0 1.3
+#> [1] 1.017555 1.250490
#>
# Get posterior draws
@@ -364,12 +364,12 @@ Examples
#> 1 lp__ -5.00
#> 2 theta 0.2
-# Run 'optimize' again with 'jacobian=TRUE' and then draw from laplace approximation
+# Run 'optimize' again with 'jacobian=TRUE' and then draw from Laplace approximation
# to the posterior
fit_optim <- mod$optimize(data = my_data_file, jacobian = TRUE)
-#> Initial log joint probability = -7.20447
+#> Initial log joint probability = -18.9282
#> Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
-#> 4 -6.74802 0.00428356 0.000109727 1 1 7
+#> 5 -6.74802 0.00032939 4.62604e-06 1 1 8
#> Optimization terminated normally:
#> Convergence detected: relative gradient magnitude is below tolerance
#> Finished in 0.1 seconds.
@@ -397,14 +397,14 @@ Examples
#> iteration: 1700
#> iteration: 1800
#> iteration: 1900
-#> Finished in 0.2 seconds.
+#> Finished in 0.1 seconds.
fit_laplace$summary()
#> # A tibble: 3 × 7
#> variable mean median sd mad q5 q95
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -7.23 -6.96 0.694 0.287 -8.53 -6.75
-#> 2 lp_approx__ -0.493 -0.211 0.714 0.286 -1.87 -0.00222
-#> 3 theta 0.264 0.248 0.120 0.120 0.0954 0.491
+#> 1 lp__ -7.23 -6.97 0.683 0.304 -8.57 -6.75
+#> 2 lp_approx__ -0.496 -0.225 0.743 0.305 -1.91 -0.00217
+#> 3 theta 0.264 0.247 0.120 0.119 0.0967 0.492
# Run 'variational' method to use ADVI to approximate posterior
fit_vb <- mod$variational(data = stan_data, seed = 123)
@@ -473,6 +473,53 @@ Examples
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
+# Run 'pathfinder' again with more paths, fewer draws per path,
+# better covariance approximation, and fewer LBFGSs iterations
+fit_pf <- mod$pathfinder(data = stan_data, num_paths=10, single_path_draws=40,
+ history_size=50, max_lbfgs_iters=100)
+#> Path [1] :Initial log joint density = -12.637372
+#> Path [1] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.531e-03 3.268e-05 1.000e+00 1.000e+00 126 -6.214e+00 -6.214e+00
+#> Path [1] :Best Iter: [5] ELBO (-6.213940) evaluations: (126)
+#> Path [2] :Initial log joint density = -11.196746
+#> Path [2] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 9.877e-04 1.507e-05 1.000e+00 1.000e+00 126 -6.283e+00 -6.283e+00
+#> Path [2] :Best Iter: [4] ELBO (-6.223987) evaluations: (126)
+#> Path [3] :Initial log joint density = -10.337120
+#> Path [3] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 7.410e-04 9.634e-06 1.000e+00 1.000e+00 126 -6.236e+00 -6.236e+00
+#> Path [3] :Best Iter: [2] ELBO (-6.179583) evaluations: (126)
+#> Path [4] :Initial log joint density = -12.005851
+#> Path [4] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.253e-03 2.257e-05 1.000e+00 1.000e+00 126 -6.159e+00 -6.159e+00
+#> Path [4] :Best Iter: [5] ELBO (-6.159209) evaluations: (126)
+#> Path [5] :Initial log joint density = -11.377707
+#> Path [5] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.032e-03 1.614e-05 1.000e+00 1.000e+00 126 -6.206e+00 -6.206e+00
+#> Path [5] :Best Iter: [2] ELBO (-6.202552) evaluations: (126)
+#> Path [6] :Initial log joint density = -7.049866
+#> Path [6] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 4 -6.748e+00 2.694e-03 5.075e-05 1.000e+00 1.000e+00 101 -6.203e+00 -6.203e+00
+#> Path [6] :Best Iter: [4] ELBO (-6.203218) evaluations: (101)
+#> Path [7] :Initial log joint density = -9.219130
+#> Path [7] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 3.841e-04 3.455e-06 1.000e+00 1.000e+00 126 -6.185e+00 -6.185e+00
+#> Path [7] :Best Iter: [5] ELBO (-6.185156) evaluations: (126)
+#> Path [8] :Initial log joint density = -17.192426
+#> Path [8] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 1.354e-03 3.651e-05 1.000e+00 1.000e+00 126 -6.204e+00 -6.204e+00
+#> Path [8] :Best Iter: [4] ELBO (-6.168586) evaluations: (126)
+#> Path [9] :Initial log joint density = -9.491732
+#> Path [9] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 5 -6.748e+00 4.697e-04 4.731e-06 1.000e+00 1.000e+00 126 -6.247e+00 -6.247e+00
+#> Path [9] :Best Iter: [3] ELBO (-6.220590) evaluations: (126)
+#> Path [10] :Initial log joint density = -6.750036
+#> Path [10] : Iter log prob ||dx|| ||grad|| alpha alpha0 # evals ELBO Best ELBO Notes
+#> 3 -6.748e+00 3.322e-04 6.069e-06 1.000e+00 1.000e+00 76 -6.214e+00 -6.214e+00
+#> Path [10] :Best Iter: [2] ELBO (-6.188430) evaluations: (76)
+#> Total log probability function evaluations:1335
+#> Finished in 0.1 seconds.
+
# Specifying initial values as a function
fit_mcmc_w_init_fun <- mod$sample(
data = stan_data,
@@ -488,7 +535,7 @@ Examples
#>
#> Both chains finished successfully.
#> Mean chain execution time: 0.0 seconds.
-#> Total execution time: 0.7 seconds.
+#> Total execution time: 0.3 seconds.
#>
fit_mcmc_w_init_fun_2 <- mod$sample(
data = stan_data,
@@ -517,7 +564,7 @@ Examples
#>
#> [[2]]
#> [[2]]$theta
-#> [1] 0.33
+#> [1] 0.3333333
#>
#>
@@ -539,7 +586,7 @@ Examples
#>
#> Both chains finished successfully.
#> Mean chain execution time: 0.0 seconds.
-#> Total execution time: 0.5 seconds.
+#> Total execution time: 0.3 seconds.
#>
fit_optim_w_init_list <- mod$optimize(
data = stan_data,
diff --git a/docs/reference/cmdstanr_example.html b/docs/reference/cmdstanr_example.html
index babf2ce04..8d377b8f0 100644
--- a/docs/reference/cmdstanr_example.html
+++ b/docs/reference/cmdstanr_example.html
@@ -187,18 +187,18 @@ Examples
fit_logistic_mcmc <- cmdstanr_example("logistic", chains = 2)
fit_logistic_mcmc$summary()
#> # A tibble: 105 × 10
-#> variable mean median sd mad q5 q95 rhat ess_bulk
-#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -66.1 -65.7 1.53 1.26 -69.1 -64.3 1.00 1090.
-#> 2 alpha 0.373 0.371 0.223 0.215 0.0169 0.729 1.00 1944.
-#> 3 beta[1] -0.678 -0.676 0.260 0.261 -1.11 -0.265 1.00 1936.
-#> 4 beta[2] -0.276 -0.274 0.234 0.239 -0.674 0.0978 1.00 1841.
-#> 5 beta[3] 0.684 0.681 0.268 0.270 0.270 1.13 1.00 2070.
-#> 6 log_lik[1] -0.518 -0.509 0.102 0.101 -0.694 -0.366 0.999 1983.
-#> 7 log_lik[2] -0.398 -0.380 0.149 0.143 -0.665 -0.194 1.00 2108.
-#> 8 log_lik[3] -0.501 -0.461 0.228 0.210 -0.939 -0.204 1.00 1995.
-#> 9 log_lik[4] -0.446 -0.428 0.157 0.148 -0.740 -0.226 1.00 1806.
-#> 10 log_lik[5] -1.18 -1.15 0.285 0.286 -1.67 -0.754 1.00 2253.
+#> variable mean median sd mad q5 q95 rhat ess_bulk
+#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 lp__ -66.0 -65.6 1.45 1.20 -68.7 -64.3 1.00 934.
+#> 2 alpha 0.384 0.386 0.218 0.218 0.0341 0.748 1.00 1959.
+#> 3 beta[1] -0.667 -0.661 0.247 0.248 -1.08 -0.273 1.00 1840.
+#> 4 beta[2] -0.275 -0.273 0.231 0.231 -0.662 0.114 1.00 1954.
+#> 5 beta[3] 0.687 0.685 0.271 0.269 0.254 1.13 1.00 2212.
+#> 6 log_lik[1] -0.515 -0.509 0.101 0.0967 -0.698 -0.360 1.00 2038.
+#> 7 log_lik[2] -0.402 -0.380 0.150 0.140 -0.673 -0.195 1.00 2565.
+#> 8 log_lik[3] -0.498 -0.467 0.223 0.212 -0.922 -0.201 1.00 2174.
+#> 9 log_lik[4] -0.449 -0.430 0.154 0.148 -0.731 -0.232 0.999 1785.
+#> 10 log_lik[5] -1.19 -1.17 0.283 0.281 -1.69 -0.772 1.00 2119.
#> # ℹ 95 more rows
#> # ℹ 1 more variable: ess_tail <dbl>
@@ -211,7 +211,7 @@ Examples
#> 2 alpha 0.364
#> 3 beta[1] -0.632
#> 4 beta[2] -0.259
-#> 5 beta[3] 0.649
+#> 5 beta[3] 0.648
#> 6 log_lik[1] -0.515
#> 7 log_lik[2] -0.394
#> 8 log_lik[3] -0.469
@@ -222,18 +222,18 @@ Examples
fit_logistic_vb <- cmdstanr_example("logistic", method = "variational")
fit_logistic_vb$summary()
#> # A tibble: 106 × 7
-#> variable mean median sd mad q5 q95
-#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -66.5 -66.1 1.98 1.74 -70.5 -64.4
-#> 2 lp_approx__ -2.01 -1.63 1.53 1.27 -5.07 -0.341
-#> 3 alpha 0.305 0.311 0.248 0.234 -0.116 0.716
-#> 4 beta[1] -0.623 -0.633 0.230 0.239 -0.987 -0.255
-#> 5 beta[2] -0.377 -0.369 0.263 0.258 -0.821 0.0339
-#> 6 beta[3] 0.681 0.671 0.291 0.288 0.215 1.16
-#> 7 log_lik[1] -0.565 -0.558 0.118 0.108 -0.766 -0.383
-#> 8 log_lik[2] -0.412 -0.388 0.172 0.156 -0.740 -0.186
-#> 9 log_lik[3] -0.641 -0.589 0.294 0.280 -1.22 -0.265
-#> 10 log_lik[4] -0.389 -0.367 0.145 0.134 -0.662 -0.190
+#> variable mean median sd mad q5 q95
+#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 lp__ -66.5 -66.0 1.82 1.62 -69.9 -64.3
+#> 2 lp_approx__ -1.96 -1.62 1.41 1.19 -4.62 -0.318
+#> 3 alpha 0.503 0.492 0.219 0.222 0.144 0.876
+#> 4 beta[1] -0.582 -0.568 0.301 0.288 -1.10 -0.0916
+#> 5 beta[2] -0.278 -0.275 0.185 0.183 -0.592 0.0118
+#> 6 beta[3] 0.688 0.696 0.301 0.307 0.211 1.18
+#> 7 log_lik[1] -0.480 -0.475 0.0981 0.0994 -0.648 -0.332
+#> 8 log_lik[2] -0.466 -0.443 0.190 0.185 -0.836 -0.197
+#> 9 log_lik[3] -0.470 -0.443 0.195 0.188 -0.838 -0.209
+#> 10 log_lik[4] -0.495 -0.480 0.152 0.148 -0.776 -0.277
#> # ℹ 96 more rows
print_example_program("schools")
@@ -254,23 +254,23 @@ Examples
#> target += normal_lpdf(y | theta, sigma);
#> }
fit_schools_mcmc <- cmdstanr_example("schools")
-#> Warning: 91 of 4000 (2.0%) transitions ended with a divergence.
+#> Warning: 146 of 4000 (4.0%) transitions ended with a divergence.
#> See https://mc-stan.org/misc/warnings for details.
fit_schools_mcmc$summary()
#> # A tibble: 11 × 10
#> variable mean median sd mad q5 q95 rhat ess_bulk ess_tail
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -57.8 -58.2 5.50 5.71 -66.3 -48.3 1.04 151. 248.
-#> 2 mu 6.47 6.50 4.26 4.17 -1.05 13.3 1.01 464. 141.
-#> 3 tau 5.22 4.49 3.59 3.40 0.984 12.2 1.04 115. 122.
-#> 4 theta[1] 9.21 8.56 7.05 6.14 -1.40 21.8 1.01 427. 239.
-#> 5 theta[2] 6.77 6.75 5.62 5.20 -2.79 15.9 1.01 718. 443.
-#> 6 theta[3] 5.35 5.83 6.82 5.87 -6.13 15.5 1.01 1103. 1908.
-#> 7 theta[4] 6.84 6.85 5.86 5.44 -2.42 16.6 1.01 923. 2076.
-#> 8 theta[5] 4.64 4.91 5.62 5.40 -4.88 13.4 1.01 775. 1603.
-#> 9 theta[6] 5.51 5.70 6.05 5.48 -4.39 15.1 1.01 639. 1878.
-#> 10 theta[7] 8.94 8.42 6.14 5.47 -0.805 19.6 1.02 272. 164.
-#> 11 theta[8] 7.08 6.94 6.75 5.70 -3.52 18.0 1.01 969. 1764.
+#> 1 lp__ -58.4 -58.5 5.06 5.42 -66.4 -50.2 1.02 139. 71.0
+#> 2 mu 6.36 6.39 4.24 4.27 -0.684 13.0 1.01 487. 345.
+#> 3 tau 5.42 4.61 3.53 3.33 1.25 12.3 1.02 136. 67.5
+#> 4 theta[1] 9.11 8.41 7.20 6.29 -1.35 21.8 1.01 774. 601.
+#> 5 theta[2] 6.65 6.69 5.88 5.59 -2.86 16.2 1.01 1011. 2093.
+#> 6 theta[3] 5.38 5.61 6.74 6.18 -5.83 15.9 1.01 863. 1953.
+#> 7 theta[4] 6.59 6.59 6.01 5.73 -2.94 16.6 1.01 946. 2109.
+#> 8 theta[5] 4.37 4.72 5.66 5.51 -5.63 12.8 1.01 745. 2276.
+#> 9 theta[6] 5.28 5.49 5.96 5.60 -4.99 14.6 1.01 879. 1751.
+#> 10 theta[7] 9.06 8.65 6.17 5.72 -0.151 20.1 1.01 678. 1072.
+#> 11 theta[8] 6.91 6.84 6.86 6.09 -4.10 17.8 1.01 939. 2286.
print_example_program("schools_ncp")
#> data {
@@ -295,36 +295,35 @@ Examples
fit_schools_ncp_mcmc <- cmdstanr_example("schools_ncp")
fit_schools_ncp_mcmc$summary()
#> # A tibble: 19 × 10
-#> variable mean median sd mad q5 q95 rhat ess_bulk
-#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 lp__ -46.9 -46.6 2.47 2.39 -51.5 -43.5 1.00 1443.
-#> 2 mu 6.50 6.57 4.25 4.13 -0.446 13.4 1.00 2941.
-#> 3 tau 4.78 3.91 3.74 3.46 0.374 12.1 1.00 1743.
-#> 4 theta_raw[1] 0.372 0.381 0.989 0.951 -1.28 1.97 1.00 3537.
-#> 5 theta_raw[2] 0.0565 0.0620 0.915 0.928 -1.45 1.53 1.00 4450.
-#> 6 theta_raw[3] -0.148 -0.163 0.938 0.932 -1.65 1.40 1.00 3407.
-#> 7 theta_raw[4] 0.00702 0.00718 0.937 0.912 -1.55 1.53 1.00 3544.
-#> 8 theta_raw[5] -0.264 -0.271 0.896 0.870 -1.70 1.23 1.00 3495.
-#> 9 theta_raw[6] -0.148 -0.157 0.950 0.938 -1.68 1.43 1.00 4517.
-#> 10 theta_raw[7] 0.351 0.374 0.924 0.876 -1.23 1.82 1.00 3596.
-#> 11 theta_raw[8] 0.0685 0.0540 0.960 0.970 -1.52 1.64 1.00 3657.
-#> 12 theta[1] 8.96 8.30 6.79 5.56 -0.975 21.5 1.00 3374.
-#> 13 theta[2] 6.90 6.72 5.56 5.25 -2.07 16.0 1.00 4663.
-#> 14 theta[3] 5.58 5.91 6.35 5.42 -5.10 15.2 1.00 3392.
-#> 15 theta[4] 6.67 6.72 6.02 5.40 -2.96 16.2 1.00 3971.
-#> 16 theta[5] 4.81 5.19 5.50 5.21 -4.81 12.9 1.00 4119.
-#> 17 theta[6] 5.55 5.86 5.93 5.29 -4.38 14.7 1.00 4010.
-#> 18 theta[7] 8.73 8.24 5.88 5.28 -0.0503 19.3 1.00 3955.
-#> 19 theta[8] 7.01 6.84 6.39 5.49 -3.28 17.9 1.00 3861.
-#> # ℹ 1 more variable: ess_tail <dbl>
+#> variable mean median sd mad q5 q95 rhat ess_bulk ess_tail
+#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 lp__ -46.9 -4.66e+1 2.49 2.36 -51.6 -43.6 1.00 1229. 1844.
+#> 2 mu 6.43 6.46e+0 4.08 3.93 -0.238 13.1 1.00 2985. 2197.
+#> 3 tau 4.74 4.03e+0 3.70 3.41 0.334 11.9 1.00 1724. 1496.
+#> 4 theta_r… 0.351 3.53e-1 0.979 0.955 -1.26 1.96 1.00 3404. 2385.
+#> 5 theta_r… 0.0484 6.67e-2 0.924 0.913 -1.49 1.53 1.00 3680. 2435.
+#> 6 theta_r… -0.131 -1.50e-1 0.962 0.938 -1.71 1.50 1.00 3067. 2557.
+#> 7 theta_r… 0.0221 5.18e-3 0.919 0.905 -1.49 1.59 1.00 3748. 2583.
+#> 8 theta_r… -0.273 -3.14e-1 0.931 0.892 -1.77 1.34 1.00 4139. 2891.
+#> 9 theta_r… -0.157 -1.57e-1 0.930 0.929 -1.69 1.36 1.00 3560. 2797.
+#> 10 theta_r… 0.363 4.01e-1 0.924 0.911 -1.15 1.87 1.00 3687. 2941.
+#> 11 theta_r… 0.0558 7.25e-2 0.951 0.924 -1.55 1.65 1.00 4077. 2555.
+#> 12 theta[1] 8.85 8.09e+0 6.85 5.77 -0.638 21.2 1.00 2994. 2531.
+#> 13 theta[2] 6.79 6.75e+0 5.59 5.01 -2.46 15.9 1.00 4593. 3367.
+#> 14 theta[3] 5.40 5.88e+0 6.64 5.63 -5.94 15.5 1.00 3448. 3181.
+#> 15 theta[4] 6.65 6.62e+0 5.69 5.09 -2.25 16.0 1.00 4537. 3155.
+#> 16 theta[5] 4.78 5.06e+0 5.54 5.26 -4.69 13.2 1.00 3996. 3191.
+#> 17 theta[6] 5.44 5.63e+0 5.97 5.29 -4.66 14.8 1.00 3934. 2877.
+#> 18 theta[7] 8.83 8.37e+0 5.98 5.56 0.141 19.4 1.00 4104. 3336.
+#> 19 theta[8] 6.89 6.73e+0 6.34 5.33 -3.03 17.1 1.00 3988. 3025.
# optimization fails for hierarchical model
cmdstanr_example("schools", "optimize", quiet = FALSE)
-#> Initial log joint probability = -319.937
+#> Initial log joint probability = -56.2449
#> Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
-#> 99 120.913 0.248985 3.76333e+09 1 1 183
+#> 99 121.706 0.109668 2.48002e+09 1 1 174
#> Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
-#> 180 242.851 0.0892321 2.24452e+16 1e-12 0.001 378 LS failed, Hessian reset
+#> 187 244.785 0.253817 8.00296 1e-12 0.001 400 LS failed, Hessian reset
#> Line search failed to achieve a sufficient decrease, no more progress can be made
#> Chain 1 Optimization terminated with error:
#> Warning: Fitting finished unexpectedly! Use the $output() method for more information.
diff --git a/docs/reference/draws_to_csv.html b/docs/reference/draws_to_csv.html
index 9f523602e..355224d76 100644
--- a/docs/reference/draws_to_csv.html
+++ b/docs/reference/draws_to_csv.html
@@ -169,10 +169,10 @@ Examples
draws_csv_files <- draws_to_csv(draws)
print(draws_csv_files)
-#> [1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpGCiVFY/fittedParams-202311081026-1-7ea6a2.csv"
-#> [2] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpGCiVFY/fittedParams-202311081026-2-7ea6a2.csv"
-#> [3] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpGCiVFY/fittedParams-202311081026-3-7ea6a2.csv"
-#> [4] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpGCiVFY/fittedParams-202311081026-4-7ea6a2.csv"
+#> [1] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpAMFHpW/fittedParams-202312131001-1-1dd4e6.csv"
+#> [2] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpAMFHpW/fittedParams-202312131001-2-1dd4e6.csv"
+#> [3] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpAMFHpW/fittedParams-202312131001-3-1dd4e6.csv"
+#> [4] "/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T//RtmpAMFHpW/fittedParams-202312131001-4-1dd4e6.csv"
# draws_csv_files <- draws_to_csv(draws,
# sampler_diagnostic = sampler_diagnostics,
diff --git a/docs/reference/fit-method-cmdstan_summary.html b/docs/reference/fit-method-cmdstan_summary.html
index 2ab3dc625..47d7f8f7f 100644
--- a/docs/reference/fit-method-cmdstan_summary.html
+++ b/docs/reference/fit-method-cmdstan_summary.html
@@ -149,7 +149,7 @@ Examples
# \dontrun{
fit <- cmdstanr_example("logistic")
fit$cmdstan_diagnose()
-#> Processing csv files: /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpGCiVFY/logistic-202311081026-1-1f791d.csv, /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpGCiVFY/logistic-202311081026-2-1f791d.csv, /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpGCiVFY/logistic-202311081026-3-1f791d.csv, /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpGCiVFY/logistic-202311081026-4-1f791d.csv
+#> Processing csv files: /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpAMFHpW/logistic-202312131001-1-2718e9.csv, /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpAMFHpW/logistic-202312131001-2-2718e9.csv, /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpAMFHpW/logistic-202312131001-3-2718e9.csv, /var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpAMFHpW/logistic-202312131001-4-2718e9.csv
#>
#> Checking sampler transitions treedepth.
#> Treedepth satisfactory for all transitions.
@@ -169,123 +169,123 @@ Examples
#> Inference for Stan model: logistic_model
#> 4 chains: each with iter=(1000,1000,1000,1000); warmup=(0,0,0,0); thin=(1,1,1,1); 4000 iterations saved.
#>
-#> Warmup took (0.023, 0.023, 0.023, 0.023) seconds, 0.092 seconds total
-#> Sampling took (0.076, 0.070, 0.072, 0.073) seconds, 0.29 seconds total
+#> Warmup took (0.022, 0.023, 0.023, 0.023) seconds, 0.091 seconds total
+#> Sampling took (0.071, 0.070, 0.070, 0.070) seconds, 0.28 seconds total
#>
#> Mean MCSE StdDev 5% 50% 95% N_Eff N_Eff/s R_hat
#>
-#> lp__ -6.6e+01 3.0e-02 1.4 -69 -6.6e+01 -6.4e+01 2277 7826 1.0
-#> accept_stat__ 0.89 1.8e-03 0.12 0.63 0.94 1.0 4996 17168 1.0e+00
-#> stepsize__ 0.80 4.6e-02 0.066 0.73 0.85 0.88 2.0 6.9 2.6e+13
-#> treedepth__ 2.3 8.8e-02 0.50 2.0 2.0 3.0 32 109 1.0e+00
-#> n_leapfrog__ 4.8 2.8e-01 2.0 3.0 3.0 7.0 53 182 1.0e+00
+#> lp__ -6.6e+01 3.1e-02 1.4 -69 -6.6e+01 -6.4e+01 2120 7545 1.0
+#> accept_stat__ 0.91 1.4e-03 0.10 0.69 0.95 1.0 5437 19350 1.0e+00
+#> stepsize__ 0.74 2.1e-02 0.030 0.70 0.75 0.78 2.0 7.1 1.1e+13
+#> treedepth__ 2.4 8.8e-03 0.53 2.0 2.0 3.0 3601 12815 1.0e+00
+#> n_leapfrog__ 5.3 3.3e-02 2.0 3.0 7.0 7.0 3773 13428 1.0e+00
#> divergent__ 0.00 nan 0.00 0.00 0.00 0.00 nan nan nan
-#> energy__ 68 4.5e-02 2.0 65 68 72 1941 6671 1.0e+00
+#> energy__ 68 4.9e-02 2.0 65 68 72 1750 6227 1.0e+00
#>
-#> alpha 3.8e-01 3.5e-03 0.22 0.014 3.8e-01 7.4e-01 4054 13931 1.0
-#> beta[1] -6.7e-01 3.7e-03 0.25 -1.1 -6.7e-01 -2.8e-01 4566 15692 1.0
-#> beta[2] -2.8e-01 3.9e-03 0.23 -0.66 -2.8e-01 9.5e-02 3521 12100 1.0
-#> beta[3] 6.8e-01 4.0e-03 0.26 0.25 6.8e-01 1.1e+00 4334 14894 1.0
-#> log_lik[1] -5.2e-01 1.6e-03 0.10 -0.69 -5.1e-01 -3.6e-01 4009 13775 1.0
-#> log_lik[2] -4.0e-01 2.2e-03 0.15 -0.69 -3.8e-01 -1.9e-01 4671 16052 1.0
-#> log_lik[3] -5.0e-01 3.7e-03 0.22 -0.91 -4.7e-01 -2.1e-01 3570 12267 1.0
-#> log_lik[4] -4.5e-01 2.4e-03 0.15 -0.72 -4.3e-01 -2.3e-01 3825 13143 1.0
-#> log_lik[5] -1.2e+00 4.1e-03 0.28 -1.7 -1.2e+00 -7.6e-01 4632 15916 1.0
-#> log_lik[6] -5.9e-01 2.8e-03 0.19 -0.93 -5.7e-01 -3.2e-01 4602 15813 1.0
-#> log_lik[7] -6.4e-01 1.9e-03 0.13 -0.86 -6.3e-01 -4.5e-01 4425 15206 1.0
-#> log_lik[8] -2.7e-01 2.3e-03 0.14 -0.54 -2.5e-01 -1.0e-01 3551 12204 1.0
-#> log_lik[9] -6.9e-01 2.6e-03 0.17 -0.99 -6.8e-01 -4.4e-01 4396 15105 1.0
-#> log_lik[10] -7.5e-01 4.0e-03 0.24 -1.2 -7.2e-01 -4.1e-01 3524 12111 1.0
-#> log_lik[11] -2.8e-01 1.9e-03 0.12 -0.51 -2.6e-01 -1.2e-01 4067 13978 1.00
-#> log_lik[12] -5.0e-01 3.5e-03 0.24 -0.94 -4.6e-01 -1.9e-01 4672 16056 1.00
-#> log_lik[13] -6.6e-01 3.0e-03 0.21 -1.0 -6.4e-01 -3.6e-01 4681 16086 1.0
-#> log_lik[14] -3.6e-01 2.9e-03 0.17 -0.69 -3.3e-01 -1.4e-01 3667 12602 1.0
-#> log_lik[15] -2.8e-01 1.6e-03 0.11 -0.47 -2.6e-01 -1.4e-01 4253 14617 1.0
-#> log_lik[16] -2.7e-01 1.5e-03 0.087 -0.43 -2.6e-01 -1.5e-01 3572 12276 1.0
-#> log_lik[17] -1.6e+00 4.6e-03 0.29 -2.1 -1.6e+00 -1.2e+00 3940 13539 1.00
-#> log_lik[18] -4.8e-01 1.7e-03 0.11 -0.68 -4.7e-01 -3.1e-01 4208 14461 1.0
-#> log_lik[19] -2.3e-01 1.3e-03 0.075 -0.37 -2.2e-01 -1.2e-01 3488 11985 1.00
-#> log_lik[20] -1.1e-01 1.3e-03 0.078 -0.26 -9.3e-02 -2.8e-02 3400 11685 1.0
-#> log_lik[21] -2.1e-01 1.4e-03 0.086 -0.37 -2.0e-01 -9.3e-02 3747 12875 1.0
-#> log_lik[22] -5.7e-01 2.3e-03 0.15 -0.84 -5.5e-01 -3.5e-01 4159 14294 1.0
-#> log_lik[23] -3.3e-01 2.3e-03 0.14 -0.60 -3.0e-01 -1.4e-01 3876 13319 1.0
-#> log_lik[24] -1.3e-01 1.1e-03 0.066 -0.26 -1.2e-01 -5.1e-02 3311 11379 1.0
-#> log_lik[25] -4.5e-01 1.9e-03 0.12 -0.67 -4.4e-01 -2.7e-01 4263 14650 1.0
-#> log_lik[26] -1.5e+00 4.9e-03 0.34 -2.1 -1.5e+00 -1.0e+00 4863 16712 1.00
-#> log_lik[27] -3.0e-01 1.9e-03 0.12 -0.53 -2.9e-01 -1.4e-01 3942 13545 1.0
-#> log_lik[28] -4.4e-01 1.3e-03 0.085 -0.59 -4.4e-01 -3.1e-01 4011 13785 1.0
-#> log_lik[29] -7.2e-01 3.4e-03 0.23 -1.1 -6.9e-01 -3.9e-01 4401 15125 1.0
-#> log_lik[30] -6.9e-01 2.9e-03 0.20 -1.0 -6.7e-01 -4.0e-01 4483 15406 1.0
-#> log_lik[31] -4.9e-01 2.5e-03 0.16 -0.78 -4.7e-01 -2.6e-01 4140 14226 1.0
-#> log_lik[32] -4.2e-01 1.6e-03 0.11 -0.61 -4.1e-01 -2.7e-01 4397 15110 1.0
-#> log_lik[33] -4.1e-01 1.9e-03 0.13 -0.64 -4.0e-01 -2.2e-01 4495 15446 1.0
-#> log_lik[34] -6.2e-02 8.6e-04 0.050 -0.16 -4.8e-02 -1.2e-02 3377 11605 1.0
-#> log_lik[35] -5.8e-01 2.5e-03 0.18 -0.90 -5.6e-01 -3.2e-01 5084 17471 1.00
-#> log_lik[36] -3.2e-01 2.0e-03 0.13 -0.56 -3.0e-01 -1.4e-01 4311 14814 1.0
-#> log_lik[37] -7.1e-01 3.7e-03 0.23 -1.1 -6.8e-01 -3.8e-01 3857 13253 1.0
-#> log_lik[38] -3.1e-01 2.3e-03 0.15 -0.58 -2.8e-01 -1.2e-01 3910 13435 1.0
-#> log_lik[39] -1.8e-01 1.8e-03 0.11 -0.39 -1.5e-01 -5.3e-02 3559 12229 1.0
-#> log_lik[40] -6.8e-01 2.0e-03 0.13 -0.92 -6.7e-01 -4.8e-01 4390 15085 1.0
-#> log_lik[41] -1.1e+00 4.2e-03 0.26 -1.6 -1.1e+00 -7.5e-01 3790 13024 1.0
-#> log_lik[42] -9.3e-01 3.1e-03 0.20 -1.3 -9.1e-01 -6.3e-01 4446 15278 1.0
-#> log_lik[43] -4.0e-01 3.5e-03 0.25 -0.89 -3.5e-01 -1.0e-01 5239 18003 1.00
-#> log_lik[44] -1.2e+00 3.0e-03 0.19 -1.5 -1.2e+00 -8.9e-01 3904 13415 1.0
-#> log_lik[45] -3.6e-01 1.8e-03 0.12 -0.57 -3.4e-01 -1.9e-01 4092 14061 1.0
-#> log_lik[46] -5.8e-01 2.0e-03 0.13 -0.82 -5.7e-01 -3.8e-01 4539 15598 1.0
-#> log_lik[47] -3.0e-01 2.0e-03 0.13 -0.55 -2.8e-01 -1.3e-01 4158 14288 1.0
-#> log_lik[48] -3.2e-01 1.3e-03 0.083 -0.47 -3.1e-01 -2.0e-01 4285 14726 1.00
-#> log_lik[49] -3.2e-01 1.3e-03 0.080 -0.46 -3.1e-01 -2.0e-01 3835 13178 1.0
-#> log_lik[50] -1.3e+00 4.6e-03 0.33 -1.9 -1.3e+00 -8.0e-01 5110 17559 1.00
-#> log_lik[51] -2.9e-01 1.4e-03 0.094 -0.45 -2.7e-01 -1.5e-01 4316 14833 1.00
-#> log_lik[52] -8.3e-01 2.3e-03 0.14 -1.1 -8.3e-01 -6.1e-01 4123 14167 1.0
-#> log_lik[53] -4.0e-01 2.0e-03 0.13 -0.64 -3.8e-01 -2.2e-01 3978 13669 1.0
-#> log_lik[54] -3.7e-01 2.2e-03 0.14 -0.63 -3.5e-01 -1.8e-01 4204 14447 1.0
-#> log_lik[55] -3.9e-01 2.0e-03 0.14 -0.64 -3.7e-01 -1.9e-01 4560 15671 1.0
-#> log_lik[56] -3.1e-01 2.9e-03 0.19 -0.68 -2.7e-01 -8.9e-02 4172 14335 1.0
-#> log_lik[57] -6.6e-01 1.9e-03 0.12 -0.87 -6.5e-01 -4.8e-01 4000 13747 1.0
-#> log_lik[58] -9.6e-01 5.3e-03 0.35 -1.6 -9.1e-01 -4.6e-01 4421 15193 1.0
-#> log_lik[59] -1.4e+00 5.3e-03 0.35 -2.0 -1.3e+00 -8.4e-01 4356 14970 1.0
-#> log_lik[60] -9.8e-01 2.5e-03 0.16 -1.3 -9.7e-01 -7.3e-01 4051 13921 1.0
-#> log_lik[61] -5.4e-01 1.5e-03 0.10 -0.71 -5.3e-01 -3.9e-01 4197 14422 1.0
-#> log_lik[62] -8.8e-01 4.6e-03 0.31 -1.4 -8.4e-01 -4.4e-01 4561 15674 1.00
-#> log_lik[63] -1.1e-01 1.3e-03 0.072 -0.26 -9.8e-02 -3.2e-02 3248 11162 1.0
-#> log_lik[64] -9.1e-01 3.9e-03 0.26 -1.4 -8.9e-01 -5.3e-01 4383 15063 1.0
-#> log_lik[65] -2.0e+00 9.5e-03 0.59 -3.0 -2.0e+00 -1.1e+00 3828 13154 1.00
-#> log_lik[66] -5.1e-01 2.0e-03 0.13 -0.75 -5.0e-01 -3.1e-01 4591 15777 1.0
-#> log_lik[67] -2.7e-01 1.3e-03 0.082 -0.42 -2.7e-01 -1.6e-01 3737 12841 1.00
-#> log_lik[68] -1.1e+00 3.9e-03 0.24 -1.5 -1.1e+00 -7.0e-01 3952 13582 1.0
-#> log_lik[69] -4.4e-01 1.3e-03 0.085 -0.59 -4.3e-01 -3.1e-01 3944 13552 1.0
-#> log_lik[70] -6.3e-01 3.4e-03 0.24 -1.1 -6.0e-01 -3.0e-01 5018 17243 1.0
-#> log_lik[71] -6.1e-01 2.8e-03 0.21 -0.98 -5.9e-01 -3.2e-01 5227 17963 1.00
-#> log_lik[72] -4.6e-01 2.6e-03 0.17 -0.78 -4.4e-01 -2.3e-01 4552 15644 1.0
-#> log_lik[73] -1.5e+00 5.9e-03 0.37 -2.2 -1.5e+00 -9.4e-01 3999 13742 1.0
-#> log_lik[74] -9.4e-01 3.0e-03 0.19 -1.3 -9.3e-01 -6.5e-01 4092 14063 1.0
-#> log_lik[75] -1.1e+00 5.6e-03 0.38 -1.8 -1.1e+00 -5.9e-01 4639 15941 1.00
-#> log_lik[76] -3.7e-01 2.3e-03 0.14 -0.63 -3.5e-01 -1.8e-01 3728 12812 1.0
-#> log_lik[77] -8.8e-01 2.2e-03 0.14 -1.1 -8.7e-01 -6.6e-01 4154 14274 1.0
-#> log_lik[78] -4.9e-01 2.4e-03 0.17 -0.80 -4.7e-01 -2.5e-01 4939 16971 1.00
-#> log_lik[79] -7.7e-01 3.2e-03 0.19 -1.1 -7.5e-01 -4.9e-01 3734 12831 1.0
-#> log_lik[80] -5.5e-01 2.8e-03 0.20 -0.91 -5.2e-01 -2.7e-01 5052 17361 1.0
-#> log_lik[81] -1.6e-01 1.6e-03 0.100 -0.35 -1.4e-01 -4.6e-02 4042 13890 1.0
-#> log_lik[82] -2.2e-01 2.1e-03 0.14 -0.50 -1.9e-01 -6.1e-02 4473 15371 1.0
-#> log_lik[83] -3.4e-01 1.3e-03 0.081 -0.49 -3.4e-01 -2.2e-01 3946 13559 1.0
-#> log_lik[84] -2.8e-01 1.4e-03 0.091 -0.44 -2.6e-01 -1.5e-01 4018 13807 1.0
-#> log_lik[85] -1.3e-01 1.3e-03 0.074 -0.27 -1.1e-01 -4.2e-02 3489 11990 1.0
-#> log_lik[86] -1.1e+00 4.7e-03 0.32 -1.7 -1.1e+00 -6.4e-01 4742 16295 1.0
-#> log_lik[87] -8.3e-01 2.0e-03 0.13 -1.0 -8.2e-01 -6.2e-01 4289 14739 1.0
-#> log_lik[88] -7.8e-01 3.5e-03 0.24 -1.2 -7.5e-01 -4.3e-01 4606 15828 1.00
-#> log_lik[89] -1.3e+00 4.9e-03 0.32 -1.9 -1.3e+00 -7.9e-01 4346 14936 1.0
-#> log_lik[90] -2.6e-01 2.1e-03 0.13 -0.51 -2.3e-01 -9.0e-02 4192 14407 1.00
-#> log_lik[91] -3.9e-01 1.9e-03 0.13 -0.62 -3.7e-01 -2.0e-01 4638 15940 1.0
-#> log_lik[92] -1.5e+00 5.2e-03 0.34 -2.1 -1.5e+00 -9.9e-01 4259 14636 1.0
-#> log_lik[93] -7.3e-01 3.6e-03 0.22 -1.1 -7.1e-01 -4.2e-01 3742 12858 1.0
-#> log_lik[94] -3.2e-01 1.4e-03 0.088 -0.48 -3.1e-01 -1.9e-01 3956 13596 1.0
-#> log_lik[95] -3.9e-01 1.8e-03 0.11 -0.59 -3.8e-01 -2.3e-01 3846 13217 1.0
-#> log_lik[96] -1.6e+00 4.5e-03 0.28 -2.1 -1.6e+00 -1.1e+00 3868 13293 1.0
-#> log_lik[97] -4.3e-01 1.5e-03 0.10 -0.61 -4.2e-01 -2.7e-01 4724 16235 1.0
-#> log_lik[98] -1.1e+00 5.5e-03 0.37 -1.7 -1.0e+00 -5.2e-01 4560 15668 1.0
-#> log_lik[99] -7.0e-01 2.2e-03 0.15 -0.95 -6.8e-01 -4.7e-01 4389 15084 1.0
-#> log_lik[100] -3.9e-01 1.5e-03 0.097 -0.56 -3.8e-01 -2.5e-01 4436 15244 1.00
+#> alpha 3.8e-01 3.5e-03 0.22 0.026 3.8e-01 7.5e-01 3978 14156 1.00
+#> beta[1] -6.7e-01 4.1e-03 0.26 -1.1 -6.6e-01 -2.6e-01 3779 13447 1.0
+#> beta[2] -2.7e-01 3.5e-03 0.23 -0.64 -2.7e-01 1.0e-01 4061 14450 1.0
+#> beta[3] 6.7e-01 4.3e-03 0.27 0.24 6.7e-01 1.1e+00 3879 13804 1.00
+#> log_lik[1] -5.1e-01 1.5e-03 0.097 -0.68 -5.1e-01 -3.7e-01 3951 14060 1.00
+#> log_lik[2] -4.1e-01 2.3e-03 0.15 -0.69 -3.9e-01 -1.9e-01 4167 14830 1.00
+#> log_lik[3] -4.9e-01 3.3e-03 0.21 -0.88 -4.6e-01 -2.1e-01 4010 14272 1.00
+#> log_lik[4] -4.5e-01 2.5e-03 0.15 -0.72 -4.4e-01 -2.4e-01 3751 13350 1.0
+#> log_lik[5] -1.2e+00 4.4e-03 0.28 -1.7 -1.2e+00 -7.6e-01 4068 14476 1.0
+#> log_lik[6] -5.9e-01 3.0e-03 0.19 -0.96 -5.7e-01 -3.2e-01 4275 15213 1.0
+#> log_lik[7] -6.4e-01 2.0e-03 0.13 -0.86 -6.4e-01 -4.5e-01 4183 14885 1.0
+#> log_lik[8] -2.8e-01 2.3e-03 0.14 -0.55 -2.5e-01 -1.1e-01 3659 13021 1.0
+#> log_lik[9] -6.9e-01 2.7e-03 0.17 -1.0 -6.7e-01 -4.4e-01 4128 14690 1.0
+#> log_lik[10] -7.3e-01 3.6e-03 0.22 -1.1 -7.1e-01 -4.1e-01 3894 13857 1.00
+#> log_lik[11] -2.8e-01 2.1e-03 0.13 -0.54 -2.6e-01 -1.1e-01 3822 13601 1.00
+#> log_lik[12] -5.0e-01 3.8e-03 0.24 -0.95 -4.6e-01 -1.9e-01 3952 14065 1.00
+#> log_lik[13] -6.6e-01 3.3e-03 0.21 -1.0 -6.4e-01 -3.5e-01 4181 14878 1.0
+#> log_lik[14] -3.6e-01 2.6e-03 0.17 -0.67 -3.2e-01 -1.4e-01 4021 14308 1.00
+#> log_lik[15] -2.8e-01 1.7e-03 0.10 -0.47 -2.6e-01 -1.3e-01 3858 13730 1.00
+#> log_lik[16] -2.8e-01 1.5e-03 0.091 -0.44 -2.7e-01 -1.5e-01 3706 13189 1.00
+#> log_lik[17] -1.6e+00 5.0e-03 0.30 -2.1 -1.6e+00 -1.1e+00 3612 12854 1.0
+#> log_lik[18] -4.8e-01 1.8e-03 0.11 -0.68 -4.7e-01 -3.1e-01 4081 14523 1.0
+#> log_lik[19] -2.3e-01 1.3e-03 0.079 -0.37 -2.2e-01 -1.2e-01 3751 13347 1.0
+#> log_lik[20] -1.1e-01 1.3e-03 0.078 -0.26 -9.4e-02 -2.8e-02 3798 13516 1.00
+#> log_lik[21] -2.1e-01 1.5e-03 0.091 -0.39 -2.0e-01 -9.3e-02 3626 12906 1.00
+#> log_lik[22] -5.7e-01 2.4e-03 0.15 -0.86 -5.5e-01 -3.5e-01 4061 14452 1.0
+#> log_lik[23] -3.3e-01 2.3e-03 0.15 -0.61 -3.1e-01 -1.4e-01 3872 13780 1.0
+#> log_lik[24] -1.4e-01 1.1e-03 0.069 -0.27 -1.2e-01 -5.1e-02 3743 13321 1.00
+#> log_lik[25] -4.6e-01 1.9e-03 0.12 -0.68 -4.5e-01 -2.8e-01 3975 14145 1.0
+#> log_lik[26] -1.5e+00 5.8e-03 0.35 -2.1 -1.5e+00 -1.0e+00 3699 13164 1.0
+#> log_lik[27] -3.1e-01 2.0e-03 0.13 -0.55 -2.9e-01 -1.4e-01 3831 13633 1.00
+#> log_lik[28] -4.4e-01 1.4e-03 0.086 -0.59 -4.4e-01 -3.1e-01 3970 14130 1.0
+#> log_lik[29] -7.3e-01 3.4e-03 0.22 -1.1 -7.1e-01 -4.0e-01 4258 15153 1.0
+#> log_lik[30] -6.9e-01 3.1e-03 0.20 -1.1 -6.8e-01 -4.0e-01 4121 14666 1.00
+#> log_lik[31] -4.9e-01 2.6e-03 0.17 -0.81 -4.7e-01 -2.5e-01 4046 14398 1.0
+#> log_lik[32] -4.2e-01 1.7e-03 0.11 -0.62 -4.1e-01 -2.6e-01 3986 14185 1.0
+#> log_lik[33] -4.1e-01 2.0e-03 0.13 -0.65 -4.0e-01 -2.2e-01 4122 14669 1.0
+#> log_lik[34] -6.5e-02 9.1e-04 0.054 -0.17 -5.0e-02 -1.3e-02 3544 12612 1.0
+#> log_lik[35] -5.9e-01 2.8e-03 0.18 -0.92 -5.7e-01 -3.2e-01 4411 15696 1.0
+#> log_lik[36] -3.3e-01 2.2e-03 0.14 -0.58 -3.0e-01 -1.4e-01 4001 14239 1.0
+#> log_lik[37] -6.9e-01 3.4e-03 0.22 -1.1 -6.7e-01 -3.7e-01 4045 14394 1.0
+#> log_lik[38] -3.2e-01 2.4e-03 0.15 -0.60 -2.9e-01 -1.2e-01 3854 13717 1.0
+#> log_lik[39] -1.8e-01 1.7e-03 0.11 -0.38 -1.5e-01 -5.2e-02 3915 13934 1.00
+#> log_lik[40] -6.8e-01 2.1e-03 0.13 -0.92 -6.7e-01 -4.8e-01 4145 14752 1.0
+#> log_lik[41] -1.1e+00 4.2e-03 0.26 -1.6 -1.1e+00 -7.3e-01 3929 13983 1.0
+#> log_lik[42] -9.3e-01 3.2e-03 0.20 -1.3 -9.1e-01 -6.3e-01 3967 14116 1.0
+#> log_lik[43] -4.1e-01 4.0e-03 0.26 -0.91 -3.4e-01 -1.0e-01 4191 14913 1.0
+#> log_lik[44] -1.2e+00 3.1e-03 0.19 -1.5 -1.2e+00 -9.0e-01 3709 13201 1.00
+#> log_lik[45] -3.6e-01 1.8e-03 0.11 -0.56 -3.4e-01 -1.9e-01 4009 14267 1.00
+#> log_lik[46] -5.9e-01 2.0e-03 0.13 -0.82 -5.8e-01 -3.8e-01 4248 15119 1.00
+#> log_lik[47] -3.1e-01 2.2e-03 0.13 -0.55 -2.9e-01 -1.3e-01 3696 13153 1.0
+#> log_lik[48] -3.2e-01 1.4e-03 0.085 -0.47 -3.2e-01 -2.0e-01 3847 13691 1.0
+#> log_lik[49] -3.2e-01 1.3e-03 0.082 -0.46 -3.1e-01 -2.0e-01 3716 13223 1.00
+#> log_lik[50] -1.3e+00 5.4e-03 0.33 -1.9 -1.3e+00 -8.1e-01 3859 13734 1.0
+#> log_lik[51] -2.9e-01 1.6e-03 0.096 -0.46 -2.8e-01 -1.5e-01 3714 13218 1.0
+#> log_lik[52] -8.4e-01 2.2e-03 0.14 -1.1 -8.3e-01 -6.2e-01 3985 14182 1.00
+#> log_lik[53] -4.0e-01 2.1e-03 0.13 -0.66 -3.9e-01 -2.1e-01 3970 14127 1.00
+#> log_lik[54] -3.7e-01 2.2e-03 0.14 -0.62 -3.5e-01 -1.8e-01 4008 14263 1.00
+#> log_lik[55] -3.9e-01 2.2e-03 0.14 -0.65 -3.7e-01 -1.9e-01 4107 14614 1.00
+#> log_lik[56] -3.2e-01 3.2e-03 0.20 -0.70 -2.8e-01 -9.3e-02 3745 13326 1.0
+#> log_lik[57] -6.5e-01 1.8e-03 0.12 -0.85 -6.5e-01 -4.8e-01 3918 13943 1.0
+#> log_lik[58] -9.4e-01 5.3e-03 0.35 -1.6 -9.0e-01 -4.5e-01 4317 15364 1.0
+#> log_lik[59] -1.4e+00 5.7e-03 0.35 -2.0 -1.3e+00 -8.4e-01 3801 13527 1.0
+#> log_lik[60] -9.8e-01 2.5e-03 0.16 -1.3 -9.7e-01 -7.4e-01 3902 13886 1.00
+#> log_lik[61] -5.4e-01 1.5e-03 0.097 -0.70 -5.3e-01 -3.9e-01 4078 14513 1.00
+#> log_lik[62] -8.9e-01 5.0e-03 0.31 -1.5 -8.5e-01 -4.4e-01 3852 13708 1.00
+#> log_lik[63] -1.2e-01 1.3e-03 0.077 -0.27 -9.9e-02 -3.2e-02 3330 11849 1.00
+#> log_lik[64] -9.0e-01 3.8e-03 0.25 -1.4 -8.8e-01 -5.3e-01 4445 15817 1.00
+#> log_lik[65] -2.0e+00 9.8e-03 0.61 -3.1 -2.0e+00 -1.1e+00 3783 13462 1.00
+#> log_lik[66] -5.1e-01 2.1e-03 0.13 -0.74 -4.9e-01 -3.1e-01 4154 14782 1.0
+#> log_lik[67] -2.8e-01 1.4e-03 0.085 -0.43 -2.7e-01 -1.6e-01 3827 13618 1.0
+#> log_lik[68] -1.1e+00 3.8e-03 0.24 -1.5 -1.0e+00 -6.8e-01 4102 14597 1.00
+#> log_lik[69] -4.3e-01 1.4e-03 0.085 -0.58 -4.3e-01 -3.0e-01 3842 13673 1.0
+#> log_lik[70] -6.4e-01 3.6e-03 0.24 -1.1 -6.1e-01 -3.1e-01 4371 15555 1.00
+#> log_lik[71] -6.1e-01 3.2e-03 0.21 -0.99 -5.9e-01 -3.1e-01 4401 15663 1.0
+#> log_lik[72] -4.6e-01 2.7e-03 0.17 -0.79 -4.5e-01 -2.2e-01 4214 14996 1.0
+#> log_lik[73] -1.5e+00 6.1e-03 0.37 -2.1 -1.4e+00 -9.2e-01 3671 13065 1.0
+#> log_lik[74] -9.5e-01 3.0e-03 0.19 -1.3 -9.4e-01 -6.7e-01 3944 14035 1.00
+#> log_lik[75] -1.2e+00 6.4e-03 0.39 -1.8 -1.1e+00 -5.9e-01 3678 13088 1.00
+#> log_lik[76] -3.7e-01 2.1e-03 0.13 -0.62 -3.5e-01 -1.8e-01 3976 14151 1.00
+#> log_lik[77] -8.8e-01 2.2e-03 0.14 -1.1 -8.8e-01 -6.6e-01 4034 14357 1.0
+#> log_lik[78] -4.8e-01 2.7e-03 0.17 -0.79 -4.6e-01 -2.4e-01 4097 14581 1.00
+#> log_lik[79] -7.6e-01 2.9e-03 0.18 -1.1 -7.4e-01 -4.8e-01 3889 13840 1.0
+#> log_lik[80] -5.5e-01 3.0e-03 0.20 -0.91 -5.2e-01 -2.7e-01 4407 15683 1.00
+#> log_lik[81] -1.7e-01 1.7e-03 0.10 -0.37 -1.4e-01 -4.8e-02 3780 13450 1.0
+#> log_lik[82] -2.3e-01 2.3e-03 0.14 -0.51 -2.0e-01 -6.3e-02 3943 14031 1.00
+#> log_lik[83] -3.4e-01 1.3e-03 0.081 -0.48 -3.4e-01 -2.2e-01 3766 13404 1.00
+#> log_lik[84] -2.7e-01 1.5e-03 0.090 -0.44 -2.6e-01 -1.4e-01 3767 13405 1.00
+#> log_lik[85] -1.3e-01 1.2e-03 0.075 -0.28 -1.1e-01 -4.1e-02 3780 13453 1.00
+#> log_lik[86] -1.1e+00 5.0e-03 0.32 -1.7 -1.1e+00 -6.4e-01 4173 14850 1.00
+#> log_lik[87] -8.3e-01 2.0e-03 0.13 -1.1 -8.2e-01 -6.2e-01 4183 14887 1.00
+#> log_lik[88] -7.8e-01 3.8e-03 0.24 -1.2 -7.5e-01 -4.2e-01 4157 14794 1.0
+#> log_lik[89] -1.3e+00 5.1e-03 0.32 -1.9 -1.2e+00 -7.9e-01 3879 13805 1.00
+#> log_lik[90] -2.6e-01 2.2e-03 0.14 -0.52 -2.4e-01 -9.4e-02 4008 14262 1.0
+#> log_lik[91] -3.9e-01 2.1e-03 0.13 -0.63 -3.8e-01 -2.1e-01 4144 14746 1.0
+#> log_lik[92] -1.5e+00 5.6e-03 0.34 -2.1 -1.5e+00 -9.7e-01 3829 13625 1.00
+#> log_lik[93] -7.5e-01 3.4e-03 0.21 -1.1 -7.2e-01 -4.4e-01 3888 13835 1.00
+#> log_lik[94] -3.2e-01 1.4e-03 0.087 -0.47 -3.1e-01 -1.9e-01 3803 13533 1.00
+#> log_lik[95] -3.9e-01 1.9e-03 0.12 -0.60 -3.8e-01 -2.2e-01 3889 13841 1.0
+#> log_lik[96] -1.6e+00 4.8e-03 0.29 -2.1 -1.6e+00 -1.1e+00 3601 12815 1.00
+#> log_lik[97] -4.3e-01 1.6e-03 0.10 -0.61 -4.2e-01 -2.7e-01 4067 14472 1.0
+#> log_lik[98] -1.0e+00 5.6e-03 0.37 -1.7 -1.0e+00 -5.2e-01 4342 15452 1.0
+#> log_lik[99] -7.0e-01 2.2e-03 0.15 -0.96 -6.9e-01 -4.7e-01 4351 15484 1.00
+#> log_lik[100] -3.9e-01 1.5e-03 0.097 -0.55 -3.8e-01 -2.4e-01 4019 14301 1.00
#>
#> Samples were drawn using hmc with nuts.
#> For each parameter, N_Eff is a crude measure of effective sample size,
diff --git a/docs/reference/fit-method-diagnostic_summary.html b/docs/reference/fit-method-diagnostic_summary.html
index 97dce2c24..53c45c1c7 100644
--- a/docs/reference/fit-method-diagnostic_summary.html
+++ b/docs/reference/fit-method-diagnostic_summary.html
@@ -161,34 +161,29 @@ See also
Examples
# \dontrun{
fit <- cmdstanr_example("schools")
-#> Chain 2 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
-#> Chain 2 Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/var/folders/s0/zfzm55px2nd2v__zlw5xfj2h0000gn/T/RtmpGCiVFY/model-11d99572dc9ce.stan', line 14, column 2 to column 41)
-#> Chain 2 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
-#> Chain 2 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
-#> Chain 2
-#> Warning: 103 of 4000 (3.0%) transitions ended with a divergence.
+#> Warning: 91 of 4000 (2.0%) transitions ended with a divergence.
#> See https://mc-stan.org/misc/warnings for details.
fit$diagnostic_summary()
-#> Warning: 103 of 4000 (3.0%) transitions ended with a divergence.
+#> Warning: 91 of 4000 (2.0%) transitions ended with a divergence.
#> See https://mc-stan.org/misc/warnings for details.
#> $num_divergent
-#> [1] 2 40 38 23
+#> [1] 12 18 11 50
#>
#> $num_max_treedepth
#> [1] 0 0 0 0
#>
#> $ebfmi
-#> [1] 0.2865692 0.3867145 0.2763028 0.3720129
+#> [1] 0.3003970 0.2974182 0.3438194 0.4920025
#>
fit$diagnostic_summary(quiet = TRUE)
#> $num_divergent
-#> [1] 2 40 38 23
+#> [1] 12 18 11 50
#>
#> $num_max_treedepth
#> [1] 0 0 0 0
#>
#> $ebfmi
-#> [1] 0.2865692 0.3867145 0.2763028 0.3720129
+#> [1] 0.3003970 0.2974182 0.3438194 0.4920025
#>
# }
diff --git a/docs/reference/fit-method-draws-1.png b/docs/reference/fit-method-draws-1.png
index 27dbcc215edcba84e9ddad214c0c299681bbcec6..a6899fc4225783ce9f836494403b096d945a5445 100644
GIT binary patch
literal 59705
zcmd>m_dnI|8~<_ay+>v^$R;aW6b^-Cls&R%cD6E-m17f5C|z;{hlrag6ju?U|SL3f#1xg
z=ApqiJS$DLd*D0xI8$j20pAGS)t`DoAS_XsFRX;M0~-kBCIo)(uAbk!o%t7m&+J|-
zoi7HIXlOc^mu{)IFViv-STIxFRC*U~qwajuHafbS>eW*cyx3{zJ@)ur*Wy`=o1dv~
z5~gL5Xze-s-d1V&VppSW+wZaAzpfSeAhfB}<)@O!)VF!v_LGGCE#3Oo`7Gq)!Ts|y
zblw7I_9&-4+)e(dZ3G(uga3c~86>#M5(@KfdRw^p00B#I6K5R3GSe*`7dr2v|K#pW
zog-U3?kKBFFhan7VIO-?v~~3Nx{+{%A7~7VhCgK>9tO{$RQ9`pUiWXmI(dQb-QZY1
z!>>Zn;e{ZVFE^{aUV~Re_4M@ch%?4DMo=ht{Q8#Hq0sY~epLMOIGWx%HYD&Ay}Ykj
z`JT&xiT0382_f?|v(ONW%~70D+urPa*!NQ{uUmY9gFn7I_S?@44&sb#bFmvKz+@1x
z1o6_Tf@JS$Ds#6q8=(#~xZSMM9J?%MCux0sT~)JSR5L8sRh+REVin64ki219I=PL#
zouE=~(8?W-o~BTC5POw|EKmKXf*Npu%I%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