1Changes in JAGS 4.3.0
2
3Bug fixes
4=========
5* Setting the RNG name and seed in a model with a data block caused a
6  crash on exit. Thanks to Sourceforge user sathomasga.
7* Samplers in the GLM module would recalculate the entire design matrix
8  on each iteration, including columns that are fixed from one iteration
9  to the next.
10* There was a memory leak in the compiler which could create redundant
11  constant nodes.
12* Models in which the nodes were defined in forward-sampling order could
13  could compile very slowly. The compilation time is now much less
14  dependent on the order in which the nodes are defined.
15* Parameter consistency checks are improved for bounded scalar stochastic
16  nodes.
17* The sum function was incorrectly reporting itself as a scale-preserving
18  function when used with multiple arguments.
19* Estimation of the deviance optimism pD was incorrect for the multinomial
20  distribution.
21* The command line interface now parses data when the first argument
22  to the structure() function has name '.Data'.
23
24New features
25============
26* New distribution dmnorm.vcov for the multivariate normal distribution
27  parameterized by the mean and the variance-covariance matrix.
28
29Changes in JAGS 4.2.0
30
31Bug fixes
32=========
33* JAGS 4.1.0 did not compile under Solaris Studio 12.3 as it referenced
34  some C99 functions that are not part of the C++98 standard (It did
35  compile under Solaris Studio 12.4).
36* The non-central t distribution (dnt) was not inserted into the bugs
37  module.
38* The likelihood for left-truncated nodes was not calculated correctly
39  (This did not affect truncated nodes with no parents, only truncated
40   outcome variables).
41
42Changes in JAGS 4.1.0
43
44Bug fixes
45=========
46* False positive warnings about unused variables in 4.0.0 and 4.0.1
47  are now fixed.
48* Using the same name for a counter as an integer vector supplied with
49  the data could lead to a "dimension mismatch" error when compiling
50  the model.
51* The compiler did not check that a subset expression was inside the
52  range of a node array leading to a logic error. This is now checked
53  in the Compiler::getRange function and a more informative
54  compilation error message is generated.
55* Setting up a large number of predictive nodes to be monitored
56  is now much faster.
57* The bugs::ConjugateNormal sample method did not work correctly with
58  an exponential prior distribution.
59* Error messages for undefined nodes and directed cycles are improved,
60  with less misclassification between the two diagnostic messages.
61* The configuration file jags.pc for pkg-config now gives the correct
62  value for the variable moduledir.
63
64New features
65============
66* A new distribution "dsample" in the bugs module represents sampling
67  without replacement. It has the same interface as "dmulti" (sampling
68  with replacement).
69
70Library changes
71===============
72* The JRmath library contains d-p-q-r functions for the Weibull distribution
73  using the shape-rate parameterization of BUGS instead of the shape-scale
74  parameterization of R. These are used by the DWeib distribution in the
75  bugs module.
76* On Windows, the DLL of the JAGS library includes version information.
77* Compiler::constFromTable returns NULL if a counter with the same name
78  is on the counter stack.
79* RScalarDist::randomSample has improved accuracy when sampling from the
80  tails.
81* Methods of the Console class consistently return false when an error
82  occurs.
83
84Internal changes in modules
85===========================
86
87* base module
88  - The restriction on the length of nodes that FiniteMethod can sample is
89  reintroduced (it was removed in release 4.0.0) but is large (100 instead
90  of 20) and does not apply to nodes with prior distribution dcat.
91
92* bugs module
93  - Interval censored continuous variables can be sampled by the Censored
94  method. Samplers are created by CensoredFactory.
95  - New distribution DSample ("dsample") for sampling with replacement.
96  - The bugs::Sum sampling method (SumMethod) now works when there are
97  likelihood terms in addition to the sum constraint provided by the
98  SumDist distribution. It can also handles the case when a SumDist node
99  has only a single stochastic parent.
100
101
102Changes in JAGS 4.0.1
103
104Internal changes in modules
105===========================
106* The FLIBS flag is not passed to modules that use LAPACK and BLAS.
107  This reverts a change in JAGS 4.0.0 that created an unwanted dependency
108  on libgfortran on Mac OS X.
109
110Changes in JAGS 4.0.0
111
112New features
113============
114* Deterministic relations can be defined with the equals sign `=`
115  as well as the left arrow `<-` (Thanks to Merlise Clyde for the suggestion).
116* All distributions now have an associated function that calculates
117  their normalized log density. If the name of the distribution is
118  "dfoo" then the corresponding log density function is called
119  "logdensity.foo". The first argument of the log density function is
120  the value at which the density is to be evaluated, and the remaining
121  arguments are the parameters of the distribution.
122* The sum and prod functions are now variadic, like their R equivalents
123  and return respectively the sum and product over all arguments.
124* The sequence operator ":" can be used in any expression. If b < a then
125  a:b returns a zero-length vector.
126* The compiler gives more detailed information about the graph. In
127  addition to printing the total number of nodes, it gives the numbers
128  of observed and unobserved stochastic nodes.
129* Vector indexing is now possible for Node arrays and arbitrary integer
130  vectors are allowed for the counter in a for loop.
131* The generalized gamma distribution dgen.gamma now has alias "dggamma"
132  for compatibility with OpenBUGS. The multinomial distribution has alias
133  "dmultinom" for compatibility with R.
134* The function c() has been added to the bugs module. Like the R function c()
135  it combines its arguments into a single vector.
136* New non-central t distribution "dnt" in the "bugs" module (from the R
137  math library)
138* Variables that are not completely defined can now be monitored. The
139  undefined elements are dropped from CODA output.
140* The compiler now gives a more informative error message when nodes
141  cannot be resolved, and tries to distinguish between the two possible
142  causes of an undefined node and a directed cycle.
143
144Bug fixes
145=========
146* Unit tests for functions and distributions using CppUnit are now
147  included and can be activated by "make check"
148* The qpar function in the bugs module was inverted.
149* The not function in the base module was inverted.
150* The ConjugateGamma sampler did not work correctly for the Chi Squared
151  distribution
152* The parser accepts form feed as a white space character
153* Fixes for lack of reproducibility (due to arbitrary ordering of
154  Nodes in a Graph) have been put in place.
155* The log-density functions for the multivariate normal (DMNorm) and
156  Wishart (DWish) distributions now return zero for non-positive
157  definite precision matrices, instead of throwing an exception. This
158  allows flexible modelling of the precision matrix.
159* The Windows installer no longer allows the same version of JAGS to
160  be installed in two different locations (leading to registry problems)
161* The qdexp function was incorrect.
162
163Library changes
164===============
165* All C++ objects and functions are in the namespace jags
166* Automake 1.12.0 or above is required. The header file generated from
167  C++ yacc source is *.hh, not *.h for automake 1.12 and above. This is
168  incompatible with previous versions.
169* The GraphView API has changed: stochasticChildren now returns a vector
170  of (non-const) pointers. This is necessary for collapsing in multi-level
171  models.
172* The Graph interface is simplified as it now inherits from set<Node*>
173* Names of functions in libjrmath are remapped to avoid namespace clashes
174  with libR and libRmath.
175* The Module.h header is moved into the module sub-directory
176* The classes RScalarDist, DFunction, PFunction, QFunction are moved
177  from the bugs module into the main library.
178* SingletonGraphView is a new subclass of GraphView to be used when
179  a single node is being sampled.
180* Subclasses of Monitor no longer need to implement the reserve function.
181  They should instead re-allocate memory during each update as necessary,
182  ensuring that an update remains an amortized constant time operation.
183* The ParallelSampler class is renamed MutableSampler. Similarly,
184  the SamplerMethod class is renamed MutableSampleMethod. The API of
185  both classes is also modified as described below.
186* The MutableSampleMethod class does not need to implement the name method.
187  The name of a MutableSampler is now defined in the constructor. (In many
188  cases the SamplerFactory can pass its own name to the Samplers it constructs:
189  this allows us to get rid of a redundant level of names).
190* A new class ImmutableSampler and corresponding class
191  ImmutableSampleMethod are added to the library for samplers that have
192  no internal state (e.g. base::FiniteSampler or bugs::ConjugateSampler).
193* StochasticNode has a new member function setData, which sets the
194  value of the node to be the same across all chains and sets the
195  status of the StochasticNode to observed. The setObserved member
196  function is defunct.  The change guarentees that observed
197  StochasticNodes have the same value across all chains. The Compiler
198  has been modified to use the new StochasticNode API.
199* The VectorFunction class has a new subclass ScalarVectorFunction for
200  scalar-valued functions that take vector-valued arguments.
201* The length of the return value of a VectorFunction and the dimension
202  of the value of an ArrayFunction may now depend on the values of
203  the arguments and not just the lengths/dimensions of the arguments.
204* A new checkParameterDiscrete member function in the Function class
205  allows Functions to check that some of the parameters are discrete.
206* A new checkParameterFixed member function in the Function class
207  allows Functions to check that some of the parameters have fixed
208  values. This check is necessary when creating a LogicalNode from
209  a Function that has a variable-sized return value depending on the
210  values of the arguments (and not just the dimensions of the arguments).
211  We can only permit this if the node has fixed length, and hence if
212  the relevant arguments are fixed.
213* The Range class now allows representation of arbitrary index ranges
214  (e.g. indices that are not contiguous, nor increasing, or include
215   repeats). This change is in support of vector indexing. The old Range
216  class is now represented by a sub-class SimpleRange.
217* The interface of the NodeArray class is simplified. Member functions
218  find and isEmpty are defunct.
219* The new NodeArraySubset class is introduced for use by Monitors.
220  The BUGSModel::getNode and Model::addExtraNode functions are defunct.
221  These functions were only needed by Monitors.
222* Calculation of Kullback-Leibler divergence is moved out of the dic
223  module and into the library.
224* The Node destructor no longer removes "this" (the node
225  being destroyed) from its parents' list of children. A new member function
226  unlinkParents() is added for this purpose.
227* A new class of closed functions DNODE_ADDITIVE is added to the
228  ClosedFuncClass enumeration, with new method Function#isAdditive to
229  support LogicalNode#isClosed. An additive function can be expressed as
230  f(x) = a + sum(x) and is fixed if a is fixed.
231* The test for valid initial values for Stochastic Nodes is moved out of
232  the model class and replaced by calls to GraphView::checkFinite in
233  the constructor of each sample method. This change enables samplers
234  to correct initial values when they are not valid.
235
236Internal changes in modules
237===========================
238* All module namespaces are nested inside namespace jags
239
240* The FLIBS flag is now passed to modules that use LAPACK and BLAS.
241  This allows static linking to LAPACK.
242
243* base module
244  - FiniteMethod no longer has a restriction on the length of the
245    nodes that it can sample.
246  - The sequence operator ":" is now defined as a function in the
247    base module. Previously it was handled by the compiler.
248  - The TraceMonitor and MeanMonitor classes take their values from a
249    NodeArraySubset instead of a Node, allowing them to be constructed
250    even when all elements of a NodeArray have not been defined.
251
252* bugs module
253  - The ConjugateDirichlet sampler is now much faster for mixture
254  models. This sampler contains some experimental features that may
255  eventually be folded into the GraphView class.
256  - The classes RScalarDist, DFunction, PFunction, QFunction are
257  moved into the main library
258  - The beta binomial distribution (DBetaBin) is moved to the mix
259  module.
260  - The logDensity function for the multivariate normal distribution
261  (DMNorm) now includes the correct normalizing constant for PDF_FULL.
262  This affects deviance statistics for multivariate normal nodes.
263  - All VectorFunctions with scalar return values now inherit from
264  the new ScalarVectorFunction class.
265  - New distribution SumDist provides an "observable function" version
266  of the sum function, and the associated sampling method SumMethodd
267  provides a sampler for its stochastic parents.
268
269* glm module
270  - Refactorization of samplers. The new Outcome class presents an
271  abstract normal approximation to the GLM engine.
272
273* mix module
274  - New sampler MixDirich for conjugate Dirichlet sampling in a mixture
275  model.
276  - New sampler LDA for Latent Dirichlet Allocation models.
277  - The beta binomial distribution (DBetaBin) is moved from the
278  bugs module.
279
280Changes in JAGS 3.4.0
281=====================
282
283New features
284====================
285* You can now set a monitor of type "mean" for any node, which records
286  the running mean.
287* The order function in the bugs module returns a permutation that sorts
288  its argument in ascending order (the inverse of the permutation
289  provided by the rank function).
290* The Windows installer now offers a choice of personal or global
291  installation for users with Admin access.
292* The negative binomial distribution is extended to allow parameters
293  size=0 and probability=1.
294
295Bug fixes
296=========
297* LogicalNode::isClosed could throw a logic_error due to a bug in
298  the checkLinear function (Linear.cc)
299* Setting a monitor with thinning interval 0 prints an error message
300  but no longer throws a logic_error exception.
301* The command line interface could print a spurious warning that
302  ".RNG.seed" or ".RNG.state" was unused.
303* A function or distribution with zero arguments caused a segmentation
304  fault. This now gives a compilation error.
305* The "dround" function (bugs module) was incorrectly calling fprec
306  (round to n significant figures) when it should have been calling
307  fround (round to n decimal places).
308* The sd() function divided by n (sample size) instead of (n-1).
309* The Windows uninstaller did not correctly uninstall personal
310  installations for users with administrative access.
311
312Internal changes in modules
313===========================
314
315* base module
316  - The Pow function has alias "pow" so it can be invoked either as "a^b"
317  or as "pow(a,b)"
318
319* bugs module
320  - The Pow function has been removed: it was a duplicate of base::pow
321  - The DSum distribution no longer throws an exception if the parameters
322  are inconsistent with the value. This gives a more informative error
323  message.
324
325
326
327Changes in JAGS 3.3.0
328=====================
329
330User-visible changes
331====================
332* JAGS now prints a warning about unused initial values
333* Failure to set a "pD" monitor from the "dic" module should produce a
334  more informative error messages
335* The Windows installer no longer creates a shortcut in the start menu
336  to the uninstaller.  Use the Control Panel to uninstall JAGS on Windows.
337
338Bug fixes
339=========
340* The inverse and logdet functions now work on scalars
341* NodeArray::setValue could overwrite values of observed nodes.
342  At the user-interface level, one could change the value of a constant
343  node by providing an initial value.
344* Underflow errors in the Weibull distribution are now caught.
345* The auxiliary mixture sampling method now works with binomial data
346  that have a zero denominator.
347* The multinomial distribution now allows a zero size parameter.
348* The log-density of the uniform distribution was incorrect when
349  doing likelihood calculations.
350* The ConjugateWishart distribution did not work correctly in mixture
351  models.
352* The choose and lchoose functions in the JRmath library could go into
353  an infinite recursion, overflowing the C stack and crashing JAGS.
354* The Poisson log-likelihood function did not return zero for non-integer
355  values. This could lead to a crash in the glm module.
356* Multiple bug fixes in the IWLS sampler in the glm module.
357
358Internal changes in modules
359===========================
360
361  bugs module
362* The InProd and MatMult functions now use BLAS calls.
363
364  glm module:
365* Cutoff for left and right expansions in Holmes-Held sampler is now optimal.
366* IWLS sampler only works with certain link functions.
367
368  dic module
369* Faster Kullback-Leibler calculations for the Bernoulli distribution.
370
371--------------------------------------------------------------------------
372Changes in JAGS 3.2.0
373
374User-visible changes
375====================
376* New observable function "dround" may be used to represent data that have
377  been rounded to a given number of decimal places.
378
379Bug fixes
380=========
381* BaseRNGFactory did not recycle RNGs correctly.
382* DMState now declares itself to be a discrete-valued distribution.
383* Likelihood calculations were incorrect for the binomial distribution
384  with unobserved size parameter.
385* The Holmes-Held sampler for logistic regression models with binary
386  outcomes is now more numerically stable.
387
388Internal changes in modules
389===========================
390* New ShiftedCount sampler samples nodes with a Poisson, binomial or
391  negative binomial prior distribution that are used as the size
392  parameter of a binomial distribution.
393* New ShiftedMultinomial sampler is a multivariate version of shiftedCount.
394  It samples nodes with a multinomial prior distribution, elements of
395  which are used as the size parameters of distinct binomial children.
396* Headers in the GLM module are properly documented.
397
398---------------------------------------------------------------------
399Changes in JAGS 3.1.0
400
401User-visible changes
402====================
403* Allow progress bar in batch mode if user gives "by" option to update
404  or adapt.
405
406Bug fixes
407=========
408* If a monitor is requested while the model is in adaptive mode, then
409  adaptive mode is turned off, with a NOTE to the user, instead of
410  throwing an exception.
411
412Library changes
413===============
414* BUGSModel::setMonitor will return after the first error message is
415  reported from a MonitorFactory.
416
417Internal changes in modules
418===========================
419* dic
420  - Improved error messages from PDTraceFactory in case a pD monitor
421    cannot be generated.
422
423-----------------------------------------------------------------------
424Changes in JAGS 3.0.0
425
426User-visible changes
427====================
428
429* Functions and distributions may now have an alias, so that they can be
430  referred to by more than one name. This allows compatibility with the
431  naming conventions of OpenBUGS (e.g. ddirch vs ddirich) and of R
432  (e.g. dbin vs dbinom).
433* Progress bar
434  - The width of the progress bar is extended from 40 to 50 characters
435  - In batch mode, the progress bar is not printed
436  - Adaptive mode is always indicated by symbol "+"
437* In batch mode JAGS halts on the first error
438* New distributions in the bugs module
439  - Non-central chi-square (dnchisqr)
440  - Beta binomial (dbetabin)
441  - Generalized gamma (dgen.gamma)
442* Separate messages are printed during compilation and initialization of
443  the model.
444* The multinomial distribution (dmulti) can take a scalar probability
445  parameter (like dcat)
446* A warning is printed if a user tries to initialize a model before it
447  is compiled. This was previously silently ignored.
448* The user has more control over the adaptive phase.  The adapt command
449  does not automatically turn off the adaptive phase and so may be
450  run sequentially until adaptation is complete.
451* When a monitor cannot be defined an attempt is made to return an
452  informative error message.
453* A single installer for Windows contains both 32-bit and 64-bit
454  versions of JAGS.
455
456Library changes
457===============
458
459* logLikelihood function renamed to logDensity. This function now
460  takes an argument allowing fast calculation of likelihoods and
461  priors.
462* New error functions declared in the header module/ModuleError.h can
463  be called from a module instead of throwing an exception.  This
464  allows safe handling when the library is statitically linked to the
465  C++ runtime, as exceptions cannot be thrown across DLL boundaries in
466  this case.
467* New subclasses of runtime_error for functions (FuncError),
468  distributions (DistError)
469* Mixture nodes may share a common MixMap, with substantial memory savings.
470* Models with large multivariate nodes have been optimized for speed.
471
472Configuration changes
473=====================
474
475* Use up-to-date m4 macros for blas and lapack from gnu autoconf archive
476* For modules, drop the -no-undefined linker flag except on Windows, where
477  it is necessary.
478* On Solaris, the macro for detecting blas automatically has been updated
479  to use new syntax -library=sunperf.
480
481Internal changes in modules
482===========================
483
484* bugs
485  - The base RNG factory only uses the time stamp once, during
486    construction, to fix the random number seed.  Use the bugs
487    namespace consistently in the bugs module
488  - Changed all instances of lgamma (C library) to lgamma_fn (R math)
489  - The DSum sampler may be multi-level (i.e. it may sample two nodes,
490    one of which is the descendant of the other)
491
492* glm
493  - The HolmesHeld sampler has been (temporarily) suppressed as its numerical
494    instability problems have not been solved.
495  - The glm module now contains a copy of CHOLMOD, AMD, COLMOD
496
497* mix
498  - The DNormMix sampler may be multi-level
499
500Bug fixes
501=========
502
503* Fixed segfault in BUGSModel when requesting monitor for node with wrong
504  dimensions
505* Fixed segfault in ConjugateMNormal
506* Fixed glm module in case of GLMs with mis-measured covariates
507  - Holmes-Held method cannot work with such models
508  - With Albert-Chib method we need to update all auxiliary data
509    at the start of each iteration
510* The lexer now accepts floating point expressions when the exponent
511  has no sign (e.g. 6.022E23 now accepted as well as 6.022E+23)
512* Corrected random number generation for
513  - Pareto distribution
514  - Multivariate T distribution
515  - Hypergeometric distribution (seg fault)
516* The constructors for Vector- and ArrayStochasticNodes now check
517  the number of parameters.
518* Fixed serious bug in NodeArray::find (It always returned 0 and led
519  to the creation of spurious aggregate nodes).
520* More informative error messages in case of module loading failure
521* Random walk Metropolis sampler now copes with non-finite log-densities
522* CalKLExact was only returning half the correct value, with
523  consequences for the pD and popt monitors.
524* The binomial distribution now allows a zero size parameter
525* Fixed bug in PDMonitorFactory that stopped Monitor objects being
526  created when any node in the model is bounded.
527* The scanner throws an exception if it encounters the Unicode
528  replacement charcter U+FFFD
529