Sat Sep 15, 2023 1. Updated Stan to C++ compiler v2.33.1. Sun Sep 10, 2023 1. Fixed the deprecated array syntax. Sat Sep 9, 2023 1. Updated Stan to C++ compiler v2.33.0. Wed May 17, 2023 1. Updated Stan to C++ compiler v2.32.2 (development). Tue May 2, 2023 1. Updated Stan to C++ compiler v2.32.1 (development). Sat April 22, 2023 1. Updated Stan to C++ compiler v2.32.0 (development). Sun April 16, 2023 1. Updated Stan to C++ compiler v2.32.0-rc1 (development). Thu March 16, 2023 1. Fixed `rstan::expose_stan_functions()` C++ compilation error (#1050). 2. Fixed `rstan::gqs()` with transformed parameters (#949). 3. Changed deprecated ggplot2 syntax to current recommendations (#1026). Tue March 14, 2023 1. Moved `stanc3` JS into `StanHeaders`. Fri February 10, 2023 1. `StanHeaders`: C++17 Compatibility Backports. 2. `stanc3`: Fix ternary ops with expressions (#1035). Tue November 22, 2022 1. Updated Stan to C++ compiler v2.31.0 (development). Wed October 11, 2022 1. Updated Stan to C++ compiler v2.31.0-rc1 (development). Wed July 27, 2022 1. Updated Stan to C++ compiler v2.30.1 (development). Mon July 25, 2020 1. Added `allow_optimizations` argument to `stanc` for level-1 compiler optimizations. 2. Added R options to override default `default` behaviour/arguments. Tue July 1, 2022 1. Updated Stan to C++ compiler v2.30.0 (development). Tue June 21, 2022 1. Updated Stan to C++ compiler v2.30.0-rc1 (development). Sat April 23, 2022 1. Fixed environment variables in `rstanplugin` (#1006). Wed April 13, 2022 1. Fixed building vignettes. 2. Fixed `log_prob` and test gradient mode in `stan_fit`. 3. Removed support for loading `tbbmalloc_proxy` on macOS. Sun March 27, 2022 1. Fixed Stan to C++ code translation and parsing, with `stanc3`. Thu March 10, 2022 1. Fixed `stanc_builder` ignoring user-provided `isystem` (#991). 2. Fixed unexpected failure with exiting `*.rds` file (#993). 3. Fixed a backward compatibility issue with `stan::io::validate_dims`. Wed December 15, 2021 1. Using `RcppParallel::CxxFlags()` instead of `RcppParallel::LdFlags()`. Tue December 14, 2021 1. Updated Stan to C++ compiler v2.28.2 (development). Mon October 18, 2021 1. Updated Stan to C++ compiler v2.28.0 (development). 2. Supported complex numbers. 3. Building `libsundials_kinsol` on Windows. 4. Allowed static build of TBB objects. Tue August 3, 2021 1. Updated package dependencies. 2. Updated Stan to C++ compiler v2.26.1. 3. Built libsundials_kinsol into `libStanHeaders`. 4. Fixed variational method checks. 5. Fixed elt_divide() ambiguity with the old version of Stan to C++ compiler. 6. Converted unit testing to use `testthat`. 7. Cleaned up and update startup messages. Thu February 18, 2021 1. Updated to Stan v2.26.1 Fri February 5, 2021 1. Using Stan transpiler ([`stanc3`](https://github.com/stan-dev/stanc3)) to generate C++ code from Stan code. 2. Reorganized directory structure and removed redundant [`math`](https://github.com/stan-dev/math) submodule. 3. Updated the symlinks in `StanHeaders/inst/include` for the reorganized directory structure. 4. Updated the [`stan`](https://github.com/stan-dev/stan) and [`math`](https://github.com/stan-dev/math) submodules, recursively, and fixed related issues. 5. Updated the [`stan`](https://github.com/stan-dev/stan) and [`math`](https://github.com/stan-dev/math) headers. 6. Updated package dependencies. 7. Updated `StanHeaders` build script. 8. Fixed `rstan` compilation errors on Windows: - Addressed symlinks-related issues. - Defined STRICT_R_HEADERS. 11. Supported the new TBB interface. 12. Respecting `RcppParallel` flags for `rstan` plugin. - `RcppParallel` now supports the new interface of Intel TBB and allows using external library, including oneTBB which uses a new interface. This requires specific compiler flags to link to the correct version of TBB library. 14. Added support for `stan::io::validate_dims`. 15. Introducing a new `stanc_process()` helper function to process Stan code. 16. Updated `stanc` to print errors and return code for debugging. 17. Linking the newest version of Sundials form [`math`](https://github.com/stan-dev/math) (currently, `sundials 5.6.1`). 18. Fixed `rstan` dependency on the development version of `StanHeaders`. 19. Fixed automatic installation of `StanHeaders` in the GitHub workflows. 20. Fixed `no valid constructor` errors and rebuilt the `Rcpp` module to expose C++ classes in R. 21. Fixed Stan and C++ code preprocessing and parsing issues. 22. Fixed V8 (Embedded JavaScript and WebAssembly Engine for R) issues. 23. Fixed (possibly) invalid URLs and used HTTPS. 24. Formatted `Rcpp` module C++ code using `clang-format`. 25. Updated DESCRIPTION, bumped version, and added contributor. 26. Added support for within-chain threading. - A new `rsran` option `threads_per_chain` has been added to control the within-chain number of threads (`n`): ```r rstan::rstan_options(threads_per_chain = n) ``` - If the model is compiled with threading support, the number of threads to use in parallelized sections _within_ an MCMC chain (e.g., when using the `Stan` functions `reduce_sum()` or `map_rect()`). The actual number of CPU cores used is `chains * threads_per_chain` where `chains` is the number of parallel chains. For an example of using threading, see [Reduce Sum: A Minimal Example](https://mc-stan.org/users/documentation/case-studies/reduce_sum_tutorial.html). 27. Initialize TBB arena and global control only if `threads_per_chain > 1`. 28. Linking to Boost C++ headers (BH >= 1.75). 29. Added `OpenCL` headers to `StanHeaders`. 30. Exposed stanc3 flags in `stanc` and `stan_model`: - `standalone_functions`: If set, the generated `C++` will be the standalone functions `C++` code. - `use_opencl`: If set, try to use `matrix_cl` signatures. - `warn_pedantic`: Emit warnings about common mistakes in Stan programs. - `warn_uninitialized`: Emit warnings about uninitialized variables. Currently an experimental feature. 31. Fixed `expose_stan_functions` with `stanc3`. 32. Updated and cleaned up `rstan` startup messages. 33. Updated `parse_data()` to remove trailing double underscores and invalid regex matches for working with `Eigen::Map` types. Fri July 24 2020 1. Bug fixes * Compilation problems * log_prob with adjust_transform = TRUE is correct again Tue July 7 2020 1. Bug fixes (presumably incomplete) * Better handling of NAs in monitor() and functions it calls 2. Features (presumably incomplete) * The sbc() function now has a save_progress argument thanks to jpritikin * The code compilation now uses the Curiously Recurring Template Pattern (CRTP) thanks to wds15 Sun July 7 2019 1. Bug fixes * Works with R 3.6 on Windows again 2. Features * New diagnostics: ess_bulk, ess_tail, and rhat calculation * New diagnostics for variational inference * New sbc function (and vignette) for Simulation Based Calibration * Supports standalone generated quantities Tue November 06 2018 1. Bug fixes * handing on makefile paths is more robust, especially on Windows * read_csv_header works again when warmup draws are omitted * matrix of draws after optimizing was transposed wrong when there was only one parameter (reported by ksvanhorn) * log_p and log_g were omitted from optimizing output when constrined was TRUE (reported by ksvanhorn) 2. Features * Should work on Windows even if CXX14 is not defined in ~/.R/Makevars or if ~/.R/Makevars does not exist * Compiler warnings are not printed to the screen by default Mon October 09 2018 1. Bug fixes * Variational Bayes variable names were off-by-one in some circumstances * get_makefile_text() works on multiarch systems * The chain ID is printed in the intermediate output again * Low BFMI threshold is changed to 0.2 from 0.3 2. Features * Requires the C++14 standard and hence R >= 3.4.0 * Calculates effective sample size more correctly, which can result in an effective sample size greater than the nominal sample size due to negative first order autocorrelation for some quantities of interest * Utilizes the pkgbuild R package * Specifying refresh = 0 suppresses all intermediate output * expose_stan_functions() uses a new, more robust procedure to generate the Stan code to be exposed to R * read_stan_csv() is faster with less memory consumed * unconstrain_pars() gains a NULL default to its pars argument, in which case the entire matrix of unconstrained parameters is returned * If the list of initial values passed to Stan has named elements, these names are retained in the output * There is now a loo.stanfit() method * HMC diagnostics can be obtained in a more programmatic way via get_divergent_iterations(), get_max_treedepth_iterations(), get_num_leapfrog_per_iteration(), get_num_divergent(), get_num_max_treedepth() Fri January 19 2018 (2.17.3) 1. Bug fixes * Might build on Solaris again * Might propogate exception messages when there are parser errors on a Mac * Propogate error messages when the list of data passed is inconsistent with the data block in a Stan program Wed December 20 2017 (2.17.2) 1. Bug fixes * Now handles data types consistently when passed by string * expose_stan_functions() now does not obfuscate model names * Now works on Macs using the clang4 compiler from the AT&T website Sun July 2, 2017 (2.16.1) 1. Bug fixes * Now throws warnings even if there is only one chain * get_inits() handles its iter argument more correctly 2. Features * expose_stan_functions() now has a ... argument allowing things to be passed to Rcpp::sourceCpp() Wed April 19, 2017 (2.15.1) 1. Bug fixes * expose_stan_functions() works with functions that return real containers Sat March 18, 2017 (2.14.2) 1. Bug fixes * Crashes less often when calling stan() repeatedly without assigning the resulting stanfit object to a symbol * expose_stan_functions() handles functions that produce integer arrays again * Improved regex for class names (thanks to Torsti Schulz) * Passing a list of matrices to the data argument works again 2. Changes * When the sample_file and / or diagnostic_file arguments to sampling() were specified and the chains were run in parallel, the resulting file names were different than if the chains were run serially. The behavior in the parallel case has been changed to match the serial case; i.e. the file will be named "foo_#.csv" where # is the chain number rather than "foo.csv#". Some scripts that expect the old behavior may now be broken, but they should be fixed easily. Wed December 28 2016 (2.14.1) 1. Bug fixes * Fix data parsing error that occurred in rare cases * expose_stan_functions() works with integer-returning functions again * Do not use more cores than chains when calling mclapply() * Fix NUTS bug (really in StanHeaders) that underestimates variance Sun December 18 2016 (2.13.2) 1. Bug fixes * Avoid using hashing to check whether a recompile is necessary * Use .rds extension rather than .rda extension (thanks @illarisheinen) * Stan file names are now allowed to start with a number * Fix stan_rdump writing NULL instead of zero-length objects * Fix for structured unconstrained parameters in plots * The model-fitting functions now search lexically for objects declared in the data block * Estimated Bayesian Fraction of Missing Information is back but will only warn if a chain is less than 0.3 * A keep.source (by default FALSE) argument was added to read_rdump in order to speed up read times (thanks @mespe) * Clarify doc on constrained parameters (thatnks @davharris) * The expose_stan_functions function gained an env argument * Relaxed attempt to find rtools on Windows * Try to preserve path order (thanks @vdorie) * The rstan package now works on openCPU * Check for existence of log files that might be cleaned out in long runs before attempting to read from them * Delete unneeded files in the temporary directory 2. Changes * New vignette on interfacing with external C++ code, plus supporting arguments to stanc and stan_model * Use forking rather than socket connections in non-Windows, non-GUI environments * Energy diagnostic is accessable from the pairs plot * Uses the bayesplot package for most plots Sat September 10 2016 (2.12.1) 1. Bug fixes * Now throws warnings even if not in interactive() mode * Now does not treat print statements as numerical problems * Update rtools.R to detect recent RTools correctly * Fix .libPaths() on child processes when multiple cores are used * Correct monitor() when a stanfit object is passed to it, which would yield wrong results otherwise 2. Changes * stanc_builder() now correctly handles comments and recursive #include statements Thu July 28 2016 (2.11.1) 1. Bug fixes * Warn if Stan program has an incomplete final line, which requires recompilation. Thanks to Chris Black. * Fix warning in use of seq. Thanks to Watal Iwasaki and Avraham Adler. * Fix refererence to T and F. Thanks to Henning Redestig. * Fix finding RTools33. Thanks to Jared Lander. * Fix for space in path to StanHeaders * Fix compilation error by suggesting BH >= 1.60.0 2. Changes * Estimated Bayesian Fraction of Missing Information is no longer printed automatically. There will be a warning if it is less than 0.3 for any chain * The chain identification number is passed to the data block as a non-negative integer called CHAIN_ID so it can (optionally) be utilized Fri June 24 2016 (2.10.1) 1. Bug fixes * Fix for expose_stan_functions() that use random-number generation * Fix crash on some platforms when R is closed 2. Changes * Vignettes now use RMarkdown instead of Sweave * Error rather than a warning when an unknown argument is passed * stanc_builder() can handle #included URLs * expose_stan_functions() and lookup() can deal with the new Stan language syntax Sun Feb 07 2016 (2.9.0-2) 1. Bug fixes * expose_stan_functions() now works with Stan's slicing syntax * expose_stan_functions() now handles exceptions correctly * stan() and sampling() will evaluate initial values in the parent process * rstan.package.skeleton() correctly calls package.skeleton() now thanks to Jonathon Steinhart * vb() works when one parameter is a prefix of another thanks to Paul Buerkner * checks its version number against that of StanHeaders to ease transitions 2. Changes * vb() now supports initial values for the parameters * parallel sampling() now uses parallel::parLapplyLB thanks to David Manheim * possibly works on Solaris Tue Jan 04 2016 (2.9.0) 1. Bug fixes * Should build from GitHub on Windows now * Fix regexes when doing chains in parallel * Fix handling of constant margins in pairs 2. Changes * Supports ADVI (both meanfield and fullrank) * Introduces save_warmup flag (default TRUE) * Uses ggplot2 2.0.0 now Thu Nov 26 2015 (2.8.1) 1. Bug fixes * Fix vignette build for R 3.1.x on Windows * Fix accidentally passing stan() arguments to stanc() * Fix output of numerical problems under Windows / RStudio * Have check button in RStudio call stanc_builder() rather than stanc() Thu Nov 19 2015 (2.8.1) 1. Bug fixes * several but nothing that would affect the draws from any posterior distribution 2. Changes * introduce stanc_builder() with C++-style #include statements * introduce rstan.package.skeleton to create a package that depends on rstan like rstanarm Sat Sep 19 2015 (2.8.0) 1. Bug fixes * lots, many of which were reported on stan-users or the rstan GitHub repository 2. Changes * informational messages are consolidated now * progress is put into the Viewer on RStudio for Windows only * open_progress = TRUE no longer hardcodes particular webbrowsers * extract_sparse_parts() function facilitates using sparse matrix multiplication by a vector * switch to ggplot2-based plots of stanfit objects * added a log argument to pairs.stanfit() Thu Jul 16 2015 (2.7.0) 1. Bug fixes * lots 2. Changes * initial CRAN release after many previous releases on GitHub and Google Code * parallel execution of chains via cores argument or setting options(mc.cores = 4) * serializing compiled models via auto_write argument or setting rstan_options(auto_write = TRUE) * introduce the expose_stan_functions() function for testing and simulation * introduce the lookup() function to find relevant Stan functions * option to specify initial values of a subset of parameters * include argument to stan, extract, etc. to allow pars to indicate which parameters to exclude * pairs function is more useful by default and shows any divergent transitions * stanfit objects waste less space on the hard disk Tue Oct 21 2014 (2.5.0) 1. Bug fixes * issue 100 * issue 102 (add warning for passing unknown arguments) * issue 104 * issue 107 (add -DEIGEN_NO_DEBUG to model compilation flags) 2. Changes * issue 103 (using stan::common::initialize_state) * add a simple parallel exapmle for Windows * update pairs function Sun Jul 20 2014 (2.4.0) 1. changes * remove nesterov optim algorithm * fix issue 90 (https://github.com/stan-dev/rstan/issues/90) * use CRAN BH and RcppEigen Mon Jun 23 2014 (2.3.0) 1. changes * updates for Stan 2.3.0 * use \n instead of \r for printing sampling progress * default to 2 digits after decimal place for print method for stanfit Wed Apr 15 2014 1. Bug fixes * issue 62 Wed Feb 26 2014 1. Bug fixes * issue 51 Thu Feb 13 2014 (2.2.0) Sun Feb 9 2014 1. Bug fixes * index out of bounds with Rcpp 0.11 Wed Jan 22 2014 1. Bug fixes * RNG seed for optimizing not used (issue #37) 2. Changes * add as_vector with default value of TRUE for stanmodel@optimizing * read_stan_csv uses R's functions to open files so that compressed files such as gzip are supported. But a compressed file can include only one file. Sat Dec 21 2013 1. Changes * speed up stanfit@extract for permuted=TRUE (code from R. Boylan) * changes due to changes in Stan's interface Sun Oct 20 2013 1. Bug fixes * specify sampler parameters such as using dense_e, unit_e 2. Changes * using fixed path for boost and eigen in Makefile.win Sun Oct 15 2013 1. Bug fixes 2. New features * add window option to traceplot * add all optimizers in Stan 3. Changes * arguments for function stan due to the changes in Stan 2.0 May 23 2013 1. Bug fixes * the output csv files was using col-major order, which should be row-major order Mar 13 2013 1. Changes * showing progress of sampling at the same line (using \r instead of \n) * plot for stanfit allows multiple pages 2. New features * add rstan:::as.mcmc.list to convert stanfit object to coda object Fri Feb 24 2013 1. Bug fixes * NA's are created when converting too large integers during data preprocessing * plot when there is an array parameter of length 1 2. New features * expose a model's log_prob and grad_log_prob function and add functions for transforming parameters between constrained space and unconstrained space * add a function monitor to summarize any mcmc samples given as a 3-d array (# iter * # chains * # parameters) Mon Dec 3 2012 1. New features * add get_posterior_mean for stanfit to obtain the posterior mean for all parameters * add optimizing for stanmodel to get MAP point estimate 2. Changes * include library Eigen (remove dependency on RcppEigen) Sat Nov 24 2012 1. New features * add read_stan_csv to create stanfit objects from sample CSV files * introduce an as.data.frame S3 method for stanfit objects Sun Nov 4 2012 1. Bug fixes * lp__ is not included when specifying pars (issue 79) https://code.google.com/p/stan/issues/detail?id=79 2. Changes * change default value of arugment `permuted` from FALSE to TRUE for extract method of S4 class stanfit Wed Oct 24 2012 1. New features * return empty stanfit object upon error such as incorrect data input, wrong argument specification, etc. Previously, it will stop. The empty stanfit includes the compiled model, so it can be reused. * add function stan_demo() to run examples included in Stan. * add function sflist2stanfit() to merge a list of stanfit objects into one, to facilitate some kind of user-level parallelism. * add S3 method as.matrix, as.array, is.array, dim, dimnames for stanfit objects. * specify seed using string of digits in addition to numbers 2. Bug fixes * bug of setting parameter epsilon_pm wrongly for NUTS Tue Sep 25 2012 1. Changes * print progress of sampling with carriage return 2. New features * add set_cppo to set c++ compiler optimization level flag * support test_grad in rstan; two modes --- sampling and test_grad --- for stanfit Mon Sep 3 2012 1. Changes * parameter n_chains changed to chains * derive model_name from model_code or file if model_name is not specified Wed Aug 2012 1. Changes * replace dots with underscores especially in function names Sun Aug 26 2012 1. New features * get more information about the sampler such as treedepth, the log-posterior back to R. 2. Changes * use underscore '_' in some output and parameter names * use lower case in print of stanfit for 'Mean', etc. Sat Aug 25 2012 1. Bug fixes * deal with the case that Rcpp and rstan is installed to a path with space, which causes the library linked to cannot be found. Fri Aug 24 2012 1. Changes use boost 1.51.0 Tue Aug 21 2012 1. Bug fixes * not working binary build for Mac (not fixed last time) * bug fixes in Stan 2. New features * add makeconf.path function to obtain the full path for file Makeconf * add Rhat legend for stanfit's plot * support saving stanfit object for reusing across R sessions * using syntax for bounded variables Sat Aug 11 2012: 1. Bug fixes * plot for stanfit wide y-axis * print for stanfit class * not working binary build for Mac, this is because variables for the path of header files are using values computed when the package is built. 2. New features * add standard error of mean (SE.Mean) to print of stanfit * function stan allow suing previous fitted stanfit object by adding parameter 'fit' * allow some type of interruption during sampling * allow data for function stan to be specified as object names 3. Others * more documentation * use GPL for License and add LicenseNote in DESCRIPTION file Wed Aug 8 2012: Uploaded to googlecode wiki: internally released.