diff --git a/DESCRIPTION b/DESCRIPTION index 44e1d284..95c0def4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: logitr Title: Logit Models w/Preference & WTP Space Utility Parameterizations -Version: 0.2.7.9000 +Version: 0.3.0 Authors@R: c( person(given = "John", family = "Helveston", diff --git a/NEWS.md b/NEWS.md index f909e96c..9e842fd5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,26 @@ +# logitr 0.3.0 + +## 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. + # logitr 0.2.7 Added support for panel data in the log-likelihood function and gradients diff --git a/README.md b/README.md index 74c0c7b2..47156ed8 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ citation("logitr") #> #> John Paul Helveston (2021). logitr: Random utility logit models with #> preference and willingness to pay space parameterizations. R package -#> version 0.2.7 +#> version 0.3.0 #> #> A BibTeX entry for LaTeX users is #> @@ -95,7 +95,7 @@ citation("logitr") #> title = {logitr: Random Utility Logit Models with Preference and Willingness to Pay Space Parameterizations}, #> author = {John Paul Helveston}, #> year = {2021}, -#> note = {R package version 0.2.7}, +#> note = {R package version 0.3.0}, #> url = {https://jhelvy.github.io/logitr/}, #> } ``` diff --git a/cran-comments.md b/cran-comments.md index 8fe67b77..d5b82da1 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ ## Test environments -* local R installation, R 4.0.4 +* local R installation, R 4.1.0 * ubuntu 16.04 (on travis-ci), R 4.0.2 * win-builder (devel and release) @@ -7,5 +7,4 @@ 0 errors | 0 warnings | 0 notes ## Notes -* This is a new release, and the second submission. -* I fixed a url redirect error in the README.md of the initial submission. +* This is a new release. diff --git a/inst/CITATION b/inst/CITATION index 75a7ba23..01263165 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -5,7 +5,7 @@ citEntry( title = "logitr: Random Utility Logit Models with Preference and Willingness to Pay Space Parameterizations", author = "John Paul Helveston", year = "2021", - note = "R package version 0.2.7", + note = "R package version 0.3.0", url = "https://jhelvy.github.io/logitr/", - textVersion = "John Paul Helveston (2021). logitr: Random utility logit models with preference and willingness to pay space parameterizations. R package version 0.2.7" + textVersion = "John Paul Helveston (2021). logitr: Random utility logit models with preference and willingness to pay space parameterizations. R package version 0.3.0" ) diff --git a/inst/extdata/choices_mnl_pref.Rds b/inst/extdata/choices_mnl_pref.Rds index d5c4708e..2a6adbdc 100644 Binary files a/inst/extdata/choices_mnl_pref.Rds and b/inst/extdata/choices_mnl_pref.Rds differ diff --git a/inst/extdata/choices_mnl_wtp.Rds b/inst/extdata/choices_mnl_wtp.Rds index 1ae0eb59..0efc6c57 100644 Binary files a/inst/extdata/choices_mnl_wtp.Rds and b/inst/extdata/choices_mnl_wtp.Rds differ diff --git a/inst/extdata/choices_mxl_pref.Rds b/inst/extdata/choices_mxl_pref.Rds index a47cacf6..7da07672 100644 Binary files a/inst/extdata/choices_mxl_pref.Rds and b/inst/extdata/choices_mxl_pref.Rds differ diff --git a/inst/extdata/choices_mxl_wtp.Rds b/inst/extdata/choices_mxl_wtp.Rds index 830d2b61..f756ba70 100644 Binary files a/inst/extdata/choices_mxl_wtp.Rds and b/inst/extdata/choices_mxl_wtp.Rds differ diff --git a/inst/extdata/int_model_price_brand.Rds b/inst/extdata/int_model_price_brand.Rds index 0ea64c97..0218c4af 100644 Binary files a/inst/extdata/int_model_price_brand.Rds and b/inst/extdata/int_model_price_brand.Rds differ diff --git a/inst/extdata/int_model_price_feat.Rds b/inst/extdata/int_model_price_feat.Rds index 10c6c808..1199b0a4 100644 Binary files a/inst/extdata/int_model_price_feat.Rds and b/inst/extdata/int_model_price_feat.Rds differ diff --git a/inst/extdata/mnl_pref.Rds b/inst/extdata/mnl_pref.Rds index dcd0e78c..3f932ae2 100644 Binary files a/inst/extdata/mnl_pref.Rds and b/inst/extdata/mnl_pref.Rds differ diff --git a/inst/extdata/mnl_pref_dannon.Rds b/inst/extdata/mnl_pref_dannon.Rds index bad1501b..b65aa819 100644 Binary files a/inst/extdata/mnl_pref_dannon.Rds and b/inst/extdata/mnl_pref_dannon.Rds differ diff --git a/inst/extdata/mnl_pref_dummies.Rds b/inst/extdata/mnl_pref_dummies.Rds index b8c6c6f3..07b17335 100644 Binary files a/inst/extdata/mnl_pref_dummies.Rds and b/inst/extdata/mnl_pref_dummies.Rds differ diff --git a/inst/extdata/mnl_pref_weight.Rds b/inst/extdata/mnl_pref_weight.Rds index 540d75d2..4965e6ab 100644 Binary files a/inst/extdata/mnl_pref_weight.Rds and b/inst/extdata/mnl_pref_weight.Rds differ diff --git a/inst/extdata/mnl_wtp.Rds b/inst/extdata/mnl_wtp.Rds index d75b38fe..dfad24ef 100644 Binary files a/inst/extdata/mnl_wtp.Rds and b/inst/extdata/mnl_wtp.Rds differ diff --git a/inst/extdata/mnl_wtp_unweighted.Rds b/inst/extdata/mnl_wtp_unweighted.Rds index 0c6fc2df..04fb3d0a 100644 Binary files a/inst/extdata/mnl_wtp_unweighted.Rds and b/inst/extdata/mnl_wtp_unweighted.Rds differ diff --git a/inst/extdata/mnl_wtp_weighted.Rds b/inst/extdata/mnl_wtp_weighted.Rds index 0aa8984c..67779bd2 100644 Binary files a/inst/extdata/mnl_wtp_weighted.Rds and b/inst/extdata/mnl_wtp_weighted.Rds differ diff --git a/inst/extdata/model_price_feat_mxl.Rds b/inst/extdata/model_price_feat_mxl.Rds index 6ee390d4..75adaf3b 100644 Binary files a/inst/extdata/model_price_feat_mxl.Rds and b/inst/extdata/model_price_feat_mxl.Rds differ diff --git a/inst/extdata/mxl_pref.Rds b/inst/extdata/mxl_pref.Rds index 60d25614..830e90ff 100644 Binary files a/inst/extdata/mxl_pref.Rds and b/inst/extdata/mxl_pref.Rds differ diff --git a/inst/extdata/mxl_wtp.Rds b/inst/extdata/mxl_wtp.Rds index 2290bf6b..66877a0c 100644 Binary files a/inst/extdata/mxl_wtp.Rds and b/inst/extdata/mxl_wtp.Rds differ diff --git a/inst/extdata/probs_mnl_pref.Rds b/inst/extdata/probs_mnl_pref.Rds index 5d91c025..561d04ba 100644 Binary files a/inst/extdata/probs_mnl_pref.Rds and b/inst/extdata/probs_mnl_pref.Rds differ diff --git a/inst/extdata/probs_mnl_wtp.Rds b/inst/extdata/probs_mnl_wtp.Rds index 152f32f4..db79ea6b 100644 Binary files a/inst/extdata/probs_mnl_wtp.Rds and b/inst/extdata/probs_mnl_wtp.Rds differ diff --git a/inst/extdata/probs_mxl_pref.Rds b/inst/extdata/probs_mxl_pref.Rds index 8f471039..297838ec 100644 Binary files a/inst/extdata/probs_mxl_pref.Rds and b/inst/extdata/probs_mxl_pref.Rds differ diff --git a/inst/extdata/probs_mxl_wtp.Rds b/inst/extdata/probs_mxl_wtp.Rds index a57f4339..5322170b 100644 Binary files a/inst/extdata/probs_mxl_wtp.Rds and b/inst/extdata/probs_mxl_wtp.Rds differ diff --git a/vignettes/probs.png b/vignettes/probs.png index 34393e0d..29e16ba8 100644 Binary files a/vignettes/probs.png and b/vignettes/probs.png differ