Skip to content

Releases: ropensci/dynamite

dynamite version 1.5.2

27 May 14:44
Compare
Choose a tag to compare

dynamite 1.5.2

  • The main package vignette has been temporarily removed as it contained out-of-date information. Please see the arXiv preprint for up-to-date information instead: https://arxiv.org/abs/2302.01607

dynamite 1.5.1

  • The type argument of coef() and plot() has been replaced by types accepting multiple types simultaneously, similar to as.data.table() and as.data.frame().
  • The functions plot_betas(), plot_deltas(), plot_nus(), plot_lambdas() and plot_psis() have been deprecated and are now provided via the default plot method by selecting the appropriate types.
  • A new argument plot_type has been added to control what type of plot will be drawn by the plot() method. The default value "default" draws the posterior means and posterior intervals of all parameters. The old functionality of drawing posterior densities and traceplots is provided by the option "trace".
  • The plot() method has gained the argument n_params to limit the amount of parameters drawn at once (per parameter type).
  • Both time-varying and time-invariant parameters can now be plotted simultaneously.
  • Fixed an issue with predict() and fitted() for multinomial responses.
  • Priors of the cutpoint parameters of the cumulative family are now customizable.
  • Both factor and ordered factor responses are now supported for categorical and cumulative families. In addition, ordered factor columns of data are no longer converted to factor columns.
  • Arguments that have the different names but the same functionality between rstan and cmdstanr can now be used interchangeably for either backend, such as iter and iter_samples.
  • The latent factor component was reparametrized for additional robustness. User-visible changes are related to priors: Instead of prior on the standard deviations sigma_lambda and tau_psi, prior is now defined on zeta, the sum of these, as well as on kappa, which is the proportion of zeta attributable to sigma_lambda.

dynamite 1.5.0

  • Estimation of dynamic multivariate panel models with multiple imputation is now available via the function dynamice() which uses the mice package.
  • predict and fitted functions no longer permutes the posterior samples when all samples are used i.e. when n_draws = NULL (default). This also corrects the standard error estimates of loo(), which were not correct earlier due to the mixing of chains.
  • Added an argument thin for loo(), predict() and fitted() methods.
  • Print method now only prints the run time for the fastest and the slowest chain instead of all chains.
  • A new exported function hmc_diagnostics() is now available.
  • Added a vignette on get_code() and get_data() functions and how they can be used to modify the generated Stan code and perform variational Bayes inference.
  • Contemporaneous dependencies are now allowed between different components of multivariate distributions, e.g., obs(c(y, x) ~ x | 1, family = "mvgaussian").
  • Ordered probit and logit regressions are now available via obs(., family = "cumulative", link = "probit") and obs(., family = "cumulative", link = "logit"), respectively.

dynamite 1.4.11

  • The package now depends on data.table version 1.15.0 or higher and the ggforce package.
  • Added a plot method for dynamiteformula objects. This method draws a directed acyclic graph (DAG) of the model structure as a snapshot in time with timepoints from the past and the future equal to the highest-order lag dependency in the model as a ggplot object. Alternatively, setting the argument tikz = TRUE returns the DAG as a character string in TikZ format. See the documentation for more details.

dynamite 1.4.10

  • The formula interface now prohibits additional invalid fixed(), varying(), and random() definitions in obs().
  • Fixed an error in Stan code generation if an offset term was included in the model formula.
  • Fixed an issue when using character type group variables.

dynamite 1.4.9

  • Added option to input a custom model code for dynamite which can be used to tweak some aspects of the model (no checks on the compatibility with the post processing are made).
  • Changed the default optimization level for cmdstanr backend to O0, as the O1 is not necessarily stable in all cases.
  • Added a new argument full_diagnostics to the print() method which can be used to control the computation of the ESS and Rhat values. By default, these are now computed only for the time- and group-invariant parameters (which are also printed).
  • The print() method now also warns about possible divergences, treedepth saturation, and low E-BMFI.
  • Fixed an error related to predict() code generation.

dynamite 1.4.8

  • Made several performance improvements to data parsing.
  • dynamite() will now retain the original column order of data in all circumstances.

dynamite 1.4.7

  • Added a note on priors vignette regarding default priors for tau parameters.
  • Fixed mcmc_diagnostics() function so that HMC diagnostics are checked also for models run with the cmdstanr backend.

dynamite 1.4.6

  • Fixed the construction of latent factors for categorical responses.

dynamite 1.4.5

  • The get_data() method for dynamitefit objects now correctly uses the previously defined priors instead of the default ones.
  • Fixed a bug in indexing of random effect terms.
  • Limited the number of parallel threads used by the data.table package to 1 in examples, tests, and vignettes for CRAN.

dynamite 1.4.4

  • Example of the lfo() method now uses a single chain and core to avoid a compatibility issue with CRAN.
  • Fixed plot_nus() for categorical responses.
  • Fixed an issue which caused an error in error message of predict() and fitted() methods when newdata contained duplicate time points within group.
  • Fixed an issue (#72) which caused NA ELPD value in lfo() in case of missing data.

dynamite 1.4.3

  • Fixed an issue with formula.dynamitefit() with models defined using lags() with a vector k argument with more than one value.
  • Fixed an issue in the lfo() method which resulted wrong ELPD estimates in panel data setting.
  • Fixed an issue in the lfo() method which in case of lagged responses caused the ELPD computations to skip last time points.

dynamite 1.4.2

  • Added further checks and fixes for backwards compatibility with Stan.
  • Fixed code generation for intercept-only categorical model.
  • Fixed code generation in the transformed data block to be backwards compatible with Stan.

dynamite 1.4.1

  • Fixed an issue in dynamite() data parsing that caused substantial memory usage in some instances.
  • Fixed an issue with Stan code generation for categorical responses.
  • Fixed an issue with formula.dynamitefit() with models that had multinomial channels.
  • Fixed an issue with formula.dynamitefit() when the df argument of splines() was NULL.
  • Formulas with trials() and offset() terms are now properly parsed when using lags().
  • Removed experimental shrinkage feature.

dynamite 1.4.0

  • dynamite() now supports parallel computation via the reduce-sum functionality of Stan.
  • Fixed an issue in predict() that resulted in redundant NAs produced warnings.
  • Fixed an issue with formula.dynamitefit() with models that had multivariate channels.

dynamite 1.3.3

  • Fixed a partial argument name issue in the internal update() method used by lfo().

dynamite version 1.3.2

18 Apr 10:54
Compare
Choose a tag to compare

dynamite 1.3.2

  • Fixed the regularization of the default priors so that they match with the priors vignette.
  • Fixed an issue with the update() method for model fit objects without a group variable.
  • Fixed an issue with the update() method in lfo().
  • Fixed an issue with "tau" and "tau_alpha" type parameters with the as_draws() method for categorical responses.
  • Fixed an issue with Stan code generation for models with time-varying covariates for categorical responses.
  • Fixed an issue with formula.dynamitefit() when the model contained a splines component.

dynamite 1.3.1

  • Fixed an incorrect URL in the main vignette.
  • "dynamitefit" objects no longer contain the data used for Stan sampling by default. This data can still be retrieved via get_data().
  • Added a new package data gaussian_simulation_fit that includes the model fit of the dynamite_simulation vignette for the example with time-varying effects.
  • The package data latent_factor_example and latent_factor_example_fit have been removed to accommodate CRAN package size requirements. The code to generate these data is still available in the data_raw directory.
  • Fixed an issue with formula.dynamitefit() when the model formula contained a lags component or a lfactor component.

dynamite version 1.3.0

30 Mar 10:24
Compare
Choose a tag to compare
  • Added support for Student's t-distribution via "student" family in obs().
  • Added support for the multinomial distribution via "multinomial" family in obs(). A trials() term is now mandatory for multinomial channels.
  • The generated Stan code now automatically switches between the array keyword syntax and the deprecated syntax based on the backend Stan version (see https://mc-stan.org/docs/reference-manual/brackets-array-syntax.html for details).
  • The presence of variables used in trials() and offset() is now properly checked in the data.
  • The model components trials() and offset() now function correctly in predict() when they contain response variables of the model.
  • Fixed the calculation of the number of observations in nobs() for models that have multivariate channels.
  • Fixed an issue in predict() with models that contained multivariate channels with random effects.
  • Scenarios that have zero non-missing observations at specific time indices are now handled properly in the Stan code generation.
  • The names of additional arguments passed to rstan::sampling() and the sample() method of the cmdstanr Stan model via ... in the call to dynamite are now checked and unrecognized arguments will be ignored.
  • Added a new function get_parameter_dims() that returns the parameter dimensions of the Stan model for "dynamitefit" and "dynamiteformula" objects.
  • Group-level random effects are now supported also for categorical and multinomial channels.
  • Added a new vignette that describes how the package can be used to simulate data from a dynamic multivariate panel model.
  • Added a new vignette that describes how the default priors of the model parameters are defined.

dynamite version 1.2.0

17 Feb 06:14
Compare
Choose a tag to compare
  • Added support for the multivariate gaussian distribution via "mvgaussian" family in obs. See the documentation of dynamiteformula for details on how to define multivariate channels.
  • Latent factors were not previously used in predict by error, this is now fixed. However, due to identifiability constraints no new group levels are allowed with models using latent factors.
  • Response variable names of the channels are now processed to avoid invalid variable names in the generated Stan code. Note that these variables names should be used when defining priors and when using methods of the dynamitefit class. You can use the functions get_priors and get_parameter_names to see the names that are available, as before.
  • Optimized prediction code by removing redundant expressions and using better indexing.