Skip to content
Jonas Björnerstedt edited this page May 27, 2015 · 12 revisions

General design

The demand code is used in three basic ways

  1. Estimation: parameters unknown, xi unknown, p and q known
  • Estimation is done on all markets but in RC, finddelta calculates on each market at a time.
  1. Simulation: parameters known, costs and xi known, p and q unknown
  • In RC done on all markets at one time - share() splits per market
  • In NL done market by market
  1. Generation: parameters known, p and xi known, q unknown

Structure of BLP market simulations in estimate

Different reasons for separating markets in demand classes

  1. Faster MixedLogit
  • Parallel estimation
  1. Sample selection in
  • estimation
  • simulation

Class for each market to make simulations faster. Static common coefficients in class.

Size of resultant demand class?

Can parallel processing be used?

Nested logit bootstrap can also benefit from having each market defined once. Group matrices do not have to be recalculated.

Have ML and MLMarket (NL and NLMarket) classes to separate market specific calculations from estimation tasks

Can period selection be put in own class, with multiple subclassing in Market and Demand classes?

Optimal IV and starting points

select

  1. Subset in estimation
  2. Subset to simulate over
  3. Single market to do work

Strategy for starting points

Data

T matrix. Set in constructor or init?

Do we need T? empty T

init and initSimulation strategies

T is sometimes needed -

  • two step estimation
  • Forecasts

Sampling

Sampling method, distribution and market draws

With many individuals, memory minimization becomes an issue, requiring either optimization, recalculation (of v and vx for example) or transforming summations over individuals to a sequential problem. Perhaps the only issue is executing large populations in parallel.

Demand and Market classes

Market and Demand classes interact. Both need the same data

Simultaneous Estimation - use subclass of both?