Skip to content

Discrete choice modeling and estimation in Julia.

License

Notifications You must be signed in to change notification settings

alexandrebrilhante/DiscreteChoice.jl

Repository files navigation

DiscreteChoice.jl

Build Status Coverage Status codecov.io

Discrete choice modeling and estimation in Julia.

Solvers

  • Gradient descent.
  • Newton.
  • Quasi-Newton using inverse BFGS.
  • Trust region using exact Hessian, BFGS or SR1.

Installation

(v1.0) pkg> add https://github.com/brilhana/DiscreteChoice.jl

Usage

The function, and its gradient and Hessian (depending on the method) must be supplied to the solver by the user. An easy way to do it is to use ForwardDiff.

using DiscreteChoice
using ForwardDiff

f(x) = (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2;

g(x) = ForwardDiff.gradient(f, x);

H(x) = ForwardDiff.hessian(f, x);

# Trust region using Steihaug-Toint.
optimize(f, g, H, tcg, zeros(2))

Examples

About

Discrete choice modeling and estimation in Julia.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages