-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changed license to MIT (after doing a bit of reading up on this) - Added placeholder hex sticker
- Loading branch information
Showing
11 changed files
with
53,911 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
^pkgdown$ | ||
^\.github$ | ||
vignettes/children | ||
^README\.Rmd$ | ||
^LICENSE\.md$ | ||
^logitr\.Rproj$ | ||
^doc$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ Authors@R: c( | |
email = "[email protected]", | ||
comment = c(ORCID = "0000-0002-2657-9191"))) | ||
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. | ||
License: GPL-3 | ||
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
YEAR: 2014-2020 | ||
COPYRIGHT HOLDER: John Paul Helveston |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
output: github_document | ||
--- | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
```{r, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
warning = FALSE, | ||
message = FALSE, | ||
comment = "#>", | ||
fig.path = "man/figures/", | ||
fig.retina = 3 | ||
) | ||
``` | ||
|
||
# logitr <a href='https://jhelvy.github.io/logitr/'><img src='man/figures/logitr-hex.png' align="right" height="139" /></a> | ||
|
||
<!-- badges: start --> | ||
[![Lifecycle: | ||
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) | ||
[![CRAN | ||
status](https://www.r-pkg.org/badges/version/logitr)](https://CRAN.R-project.org/package=logitr) | ||
<!-- badges: end --> | ||
|
||
**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](https://jhelvy.github.io/logitr/articles/utility_models.html). | ||
The current version includes support for: | ||
|
||
- Homogeneous multinomial logit (MNL) models | ||
- Heterogeneous mixed logit (MXL) models (with normal and log-normal parameter distributions). | ||
- Preference space utility parameterization. | ||
- WTP space utility parameterization. | ||
- 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). | ||
|
||
The package also has additional functions for: | ||
|
||
- Computing and comparing WTP from both preference space and WTP space models. | ||
- Simulating the expected shares of a set of alternatives using an estimated model. | ||
|
||
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). | ||
|
||
View the [basic usage](https://jhelvy.github.io/logitr/articles/basic_usage.html) page for details on how to use **logitr** to estimate models. | ||
|
||
## Installation | ||
|
||
The current version is not yet on CRAN, but you can install it from | ||
Github using the **devtools** library: | ||
|
||
```{r, eval=FALSE} | ||
devtools::install_github("jhelvy/logitr") | ||
``` | ||
|
||
Load the library with: | ||
```{r, eval=FALSE} | ||
library(logitr) | ||
``` | ||
|
||
## Required Libraries | ||
|
||
**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). | ||
|
||
## Author, Version, and License Information | ||
|
||
- Author: *John Paul Helveston* [www.jhelvy.com](http://www.jhelvy.com/) | ||
- Date First Written: *Sunday, September 28, 2014* | ||
- Most Recent Update: `r format(Sys.Date(), format="%B %d %Y")` | ||
- License: [MIT](https://github.com/jhelvy/logitr/blob/master/LICENSE.md) | ||
- [Latest Release](https://github.com/jhelvy/logitr/releases/latest): 0.0.4 | ||
|
||
# Citation Information | ||
|
||
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: | ||
|
||
```{r} | ||
citation("logitr") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.