Skip to content

Releases: jhelvy/logitr

logitr 1.0.1

19 Feb 14:56
Compare
Choose a tag to compare
  • Added a startup message when the package is loaded
  • Fixed bug in adjustFactorLevels where the levels_orig object was being accidentally overwritten

logitr 1.0.0

07 Feb 13:58
Compare
Choose a tag to compare
  • Added JSS article DOI throughout package documentation.
  • Fixed bug #41 where the predict() method would error if factor levels were missing in newdata.

logitr 0.7.0

16 Jun 23:25
dbd5909
Compare
Choose a tag to compare
  • A new vignette on benchmarking was added which tests the package speed against other similar packages.
  • A new data set, runtimes, was included, which is exported from the colab notebook used for benchmarking here: https://colab.research.google.com/drive/1vYlBdJd4xCV43UwJ33XXpO3Ys8xWkuxx?usp=sharing
  • Sobol draws are supported via a new drawType argument.
  • A warning is displayed against using Halton draws after 5 random variables have been specified in a mixed logit model. Users are encouraged to switch to using Sobol draws and increasing the number of draws to at least 200.
  • Changed the argument name price to scalePar to be more general.
  • Changed the argument name randPrice to randScale to be more general.
  • The modelSpace argument is no longer required for specifying a WTP space model as it is redundant. Including a scalePar argument is enough to determine that it is a WTP space model.

Improved `predict()` method

25 Oct 17:44
Compare
Choose a tag to compare

This package release (v0.4.0) largely affects how predictions are calculated by introducing a new predict.logitr() method, along with other related changes:

  • The predictProbs() and predictChoices() functions were depreciated.
  • Added new fitted.logitr() and residuals.logitr() methods.
  • Added optional predict argument to the main logitr() function which controls whether predicted probabilities, fitted.values, and residuals are included in the returned object. Default setting is TRUE.
  • Changed the name of the coefficients vector in the returned object from "coef" to "coefficients" to be consistent with other packages.
  • Changed the argument name from "choice" to "outcome" to be more general.
  • Fixed bug where the returned object contained the scaled data rather than the original, unscaled data.

Fast estimation and panel data support

13 Aug 18:55
Compare
Choose a tag to compare

Breaking changes with v0.2.0:

  • Several arguments were moved out of the previous options argument and are now passed directly as arguments to logitr(). These include: numMultiStarts, useAnalyticGrad, scaleInputs, startParBounds, standardDraws, numDraws, startVals. The options argument is now only used for options to control the optimization handled by nloptr().
  • Options for keeping all model outputs on a multistart were removed.

Summary of larger updates:

  • Added support for panel data in the log-likelihood function and gradients.
  • Several argument names in the logitr() function were changed to make them easier to understand: choiceName became choice, obsIDName became obsID, parNames became pars, priceName became price, weightsName became weights, clusterName became cluster. If used, old names will be passed to the new argument names and a warning will be displayed.
  • The log-likelihood and gradient functions were overhauled to improve computational efficiency, resulting in substantially faster estimation for all models.
  • The following new methods were introduced: print.logitr(), logLik.logitr(), coef.summary.logitr(), vcov.logitr(), terms.logitr()

Summary of smaller updates:

  • Improved summary.logitr() and coef.logitr() methods for better printing, now using printCoefmat().
  • Added input checks for wtp() and wtpCompare() functions
  • Fixed some errors in some of the documentation examples and removed the dontrun commands on all of them.
  • Added the altIDName argument to predictChoices() and predictProbs() to preserve the row order of predictions for each alternative in each set of alternatives. Closes issue #13.
  • Fixed bug in data encoding where random parameter names were not aligned with encoded data.
  • Added input checks for all predict functions.

Version 0.2.0

15 Jun 22:46
Compare
Choose a tag to compare

Version .Lots of improvements over version 0.1.0

Summary of larger updates:

  • New prediction functions: predictChoices() and predictProbs(), and , depreciated simulateShares().
  • Added robust covariance matrix calculations.
  • Added support for clustering errors.
  • Major modifications to the recodeData() function to improve encoding efficiency.
  • Depreciated dummyCode()

Summary of smaller updates:

  • Improved documentation across all vignettes for new features.
  • Improved explanation of preference space and WTP space utility models in vignettes.
  • Modified the recodeData() function for improved speed and added tests.

Three small bugs

19 Mar 17:48
Compare
Choose a tag to compare
  • Fixed bug where model with single variable would error due to a matrix being converted to a vector in the standardDraws() function
  • Fixed bug in getCatVarDummyNames() - previously used string matching, which can accidentally match with other similarly-named variables.
  • Fixed bug in rowsum() where the reorder argument was set to TRUE, which resulted in wrong logit calculations unless the obsID happened to be already sorted.

0.1.0 on CRAN!

20 Jan 16:24
Compare
Choose a tag to compare

logitr 0.1.0

Summary of larger updates:

  • v0.1.0 on CRAN!

Summary of smaller updates:

  • Reduced the length of the title in DESCRIPTION to less than 65 characters.
  • Changed package names in title and description to single quotes, e.g: {nloptr} -> 'nloptr'
  • Added reference in description with doi to Train (2009) "Discrete Choice Methods with Simulation, 2nd Edition".
  • Added \value statements to dummyCode.Rd and statusCodes.Rd
  • Added \value statements to dummyCode.Rd and statusCodes.Rd.
  • Updated \value description for summary.logitr.Rd.
  • Modified multiple functions to use message()/warning() instead of print()/cat().
  • Added algorithm to the options input, with the default being set to "NLOPT_LD_LBFGS".

Bugs

  • Fixed tiny bug in getParTypes() function - previously was not returning the correct parNames for continuous vs. discrete variables.
  • Added an input check to make sure the modelSpace argument is either "pref" or "wtp".
  • Added an input check to make sure the priceName argument is only used when the modelSpace argument is set to "wtp".

Models with interactions

07 Dec 23:44
Compare
Choose a tag to compare

logitr 0.0.5

Summary of larger updates:

  • Added support for auto creating interactions amongst variables
  • exported getCoefTable() function

Summary of smaller updates:

  • Added new documentation for prepping data:
    • overall structure
    • dummyCode() function
    • handling interactions
  • All vignettes proof-read with lots of small changes to examples
  • Added a hex sticker

Weighted models, new dataset, new encoding features

04 Dec 15:57
Compare
Choose a tag to compare

Summary of larger updates:

  • Added support for estimating weighted regressions
  • Added and improved documentation for new datasets: yogurt, cars_china, cars_us
  • Exported the dummyCode() function for automatically creating dummy-coded variables in a data frame.
  • Added support for auto dummy-coding categorical variables prior to model estimation
  • Major overhaul of documentation using {pkgdown}

Summary of smaller updates:

  • Changed license to MIT (after doing a bit of reading up on this)
  • Fixed dimension-matching issue with user-provided draws for mixed logit models
  • Fixed bug in modelInputs where obsID was not a vector for tibble inputs
  • Added placeholder hex sticker