Releases: jhelvy/logitr
Releases · jhelvy/logitr
logitr 1.0.1
logitr 1.0.0
- Added JSS article DOI throughout package documentation.
- Fixed bug #41 where the
predict()
method would error if factor levels were missing innewdata
.
logitr 0.7.0
- 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
toscalePar
to be more general. - Changed the argument name
randPrice
torandScale
to be more general. - The
modelSpace
argument is no longer required for specifying a WTP space model as it is redundant. Including ascalePar
argument is enough to determine that it is a WTP space model.
Improved `predict()` method
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()
andpredictChoices()
functions were depreciated. - Added new
fitted.logitr()
andresiduals.logitr()
methods. - Added optional
predict
argument to the mainlogitr()
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
Breaking changes with v0.2.0:
- Several arguments were moved out of the previous
options
argument and are now passed directly as arguments tologitr()
. These include:numMultiStarts
,useAnalyticGrad
,scaleInputs
,startParBounds
,standardDraws
,numDraws
,startVals
. Theoptions
argument is now only used for options to control the optimization handled bynloptr()
. - 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
becamechoice
,obsIDName
becameobsID
,parNames
becamepars
,priceName
becameprice
,weightsName
becameweights
,clusterName
becamecluster
. 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()
andcoef.logitr()
methods for better printing, now usingprintCoefmat()
. - Added input checks for
wtp()
andwtpCompare()
functions - Fixed some errors in some of the documentation examples and removed the dontrun commands on all of them.
- Added the
altIDName
argument topredictChoices()
andpredictProbs()
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
Version .Lots of improvements over version 0.1.0
Summary of larger updates:
- New prediction functions:
predictChoices()
andpredictProbs()
, and , depreciatedsimulateShares()
. - 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
- 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 thereorder
argument was set toTRUE
, which resulted in wrong logit calculations unless theobsID
happened to be already sorted.
0.1.0 on CRAN!
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 theoptions
input, with the default being set to"NLOPT_LD_LBFGS"
.
Bugs
- Fixed tiny bug in
getParTypes()
function - previously was not returning the correctparNames
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 themodelSpace
argument is set to"wtp"
.
Models with interactions
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
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
whereobsID
was not a vector for tibble inputs - Added placeholder hex sticker