You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: logitr estimates multinomial (MNL) and mixed logit (MXL) models in R. Models can be estimated using "Preference" space or "Willingness-to-pay" (WTP) space utility parameterizations. The program includes an option to run a multistart optimization loop with random starting points in each iteration, which is useful for non-convex problems like MXL models or models with WTP space utility parameterizations. The main optimization loop uses the nloptr function to minimize the negative log-likelihood function. The package has additional functions for computing and comparing WTP from both preference space and WTP space models and for simulating the expected shares of a set of alternatives using an estimated model.
Copy file name to clipboardExpand all lines: NEWS.md
+32-6Lines changed: 32 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,41 @@
1
-
# logitr 0.0.3: New simulation functionality
1
+
# logitr 0.0.4
2
+
3
+
Weighted models, new dataset, new encoding features
4
+
5
+
## Summary of larger updates:
6
+
7
+
- Added support for estimating weighted regressions
8
+
- Added and improved documentation for new datasets: `yogurt`, `cars_china`, `cars_us`
9
+
- Exported the `dummyCode()` function for automatically creating dummy-coded variables in a data frame.
10
+
- Added support for auto dummy-coding categorical variables prior to model estimation
11
+
- Major overhaul of documentation using {pkgdown}
12
+
13
+
## Summary of smaller updates:
14
+
15
+
- Changed license to MIT (after doing a bit of reading up on this)
16
+
- Fixed dimension-matching issue with user-provided draws for mixed logit models
17
+
- Fixed bug in `modelInputs` where `obsID` was not a vector for tibble inputs
18
+
- Added placeholder hex sticker
19
+
20
+
21
+
# logitr 0.0.3
22
+
23
+
New simulation functionality
2
24
3
25
## Summary of larger updates:
4
26
5
-
* Added support for simulating shares for a set of alternatives given an estimated model: `simulateShares()`. This is similar to the `predict()` function in mlogit.
6
-
* Removed support for using an estimated preference space model as an input in the `options()` function. I found this just far too confusing, and instead encourage users to supply a WTP space model with the computed WTP from a preference space model as starting parameters.
27
+
- Added support for simulating shares for a set of alternatives given an estimated model: `simulateShares()`. This is similar to the `predict()` function in mlogit.
28
+
- Removed support for using an estimated preference space model as an input in the `options()` function. I found this just far too confusing, and instead encourage users to supply a WTP space model with the computed WTP from a preference space model as starting parameters.
7
29
8
30
## Summary of smaller updates:
9
31
10
-
* Updated the `summary()` and main `logitr()` functions to keep the basic information (run #, log-likelihood value, number of iterations, and output status) whenever `numMultistarts` > 1. Previously this information was only kept if `keepAllRuns` was set to `TRUE`.
32
+
- Updated the `summary()` and main `logitr()` functions to keep the basic information (run #, log-likelihood value, number of iterations, and output status) whenever `numMultistarts` > 1. Previously this information was only kept if `keepAllRuns` was set to `TRUE`.
33
+
11
34
12
35
36
+
# logitr 0.0.2
13
37
14
-
# logitr 0.0.2: Updates to options and a few small bug fixes
38
+
Updates to options and a few small bug fixes
15
39
16
40
## Summary of larger updates:
17
41
@@ -38,6 +62,8 @@ getting the right logLik value too.
38
62
39
63
40
64
41
-
# logitr 0.0.1: Full reboot of logitr!
65
+
# logitr 0.0.1
66
+
67
+
Full reboot of logitr!
42
68
43
69
Long overdue, I decided to give the logitr program a full overhaul. This is the first version that is compiled as a proper R package that can be directly installed from Github. This version is much more robust and flexible than the prior, clunky collection of R files that I had previously been using to estimate logit models.
- Heterogeneous mixed logit (MXL) models (with normal and log-normal parameter distributions).
35
+
- Preference space utility parameterization.
36
+
- WTP space utility parameterization.
37
+
- An optional multistart optimization that uses different random starting points in each iteration (useful for non-convex problems like MXL models or models with WTP space parameterizations).
38
+
39
+
The package also has additional functions for:
40
+
41
+
- Computing and comparing WTP from both preference space and WTP space models.
42
+
- Simulating the expected shares of a set of alternatives using an estimated model.
43
+
44
+
Note: MXL models assume uncorrelated heterogeneity covariances and are estimated using maximum simulated likelihood based on the algorithms in [Kenneth Train’s](http://eml.berkeley.edu/~train/) book [*Discrete Choice Methods with Simulation, 2nd Edition (New York: Cambridge University Press, 2009)*](http://eml.berkeley.edu/books/choice2.html).
45
+
46
+
View the [basic usage](https://jhelvy.github.io/logitr/articles/basic_usage.html) page for details on how to use **logitr** to estimate models.
47
+
48
+
## Installation
49
+
50
+
The current version is not yet on CRAN, but you can install it from
51
+
Github using the **devtools** library:
52
+
53
+
```{r, eval=FALSE}
54
+
devtools::install_github("jhelvy/logitr")
55
+
```
56
+
57
+
Load the library with:
58
+
```{r, eval=FALSE}
59
+
library(logitr)
60
+
```
61
+
62
+
## Required Libraries
63
+
64
+
**logitr** requires the [**nloptr**](https://cran.r-project.org/web/packages/nloptr/index.html) library. This is because `nloptr()` allows for both the objective and gradient functions to be computed in a single function. This speeds up computation time considerably because both the objective and gradient functions require many of the same calculations (e.g. computing probabilities).
65
+
66
+
## Author, Version, and License Information
67
+
68
+
- Author: *John Paul Helveston*[www.jhelvy.com](http://www.jhelvy.com/)
69
+
- Date First Written: *Sunday, September 28, 2014*
70
+
- Most Recent Update: `r format(Sys.Date(), format="%B %d %Y")`
If you use this package for in a publication, I would greatly appreciate it if you cited it. You can get the citation information by typing `citation("logitr")` into R:
0 commit comments