Comments (7)
adding discrete types would be helpful, thus allowing for a bimodal distribution. Thanks for all the work you have put into this.
from pyblp.
Thanks. This seems like a popular request. It's high up on my to-do list -- I'll update this thread when I get around to it.
from pyblp.
Do you have any updates on this? I'm interested in testing a simulation with a two-point distribution for the taste distribution, but I'm unsure how to modify the code accordingly. Any guidance or updates would be much appreciated.
from pyblp.
No updates yet. The challenge is that implementing this in a flexible way would require a lot of additions. For example:
- A new parameter vector, say
tau
, with visual output. - Replace
weights
inagent_data
with some function oftau
and demographics. Here, demographic dummies could encode different observed or unobserved types. - Handle the standard issue that unobserved types are often exchangeable, so you want to impose some ordering on
tau
or the weights that it generates. Otherwise you get multiple (observationally equivalent) global optima. Maybe this is ok. - Gradients with respect to
tau
. - Make sure optimal IVs work.
- Would importance sampling still make sense?
- Delta method to get some type of interpretable
weights
estimates? - Add simulations to the unit tests with discrete types to be sure everything else works.
I'm not sure if the above is the best way of doing this, but it's one thought.
If you're interested in implementing something like this, the place to start is parameters.py
, where abstract parameter classes are defined. A new tau
parameter would act a lot like pi
and rho
, so following where these names show up in the code will point to what else would need to be modified.
from pyblp.
As Jeff describes, the general case (unknown types, unknown weights) finite mixture is pretty hard to implement.
For a specific case with two types, you could imagine a demographic variable called is "business_travelers" that is {0,1}.
If you happened to know the fraction of that type estimation would be straightforward with the existing PyBLP implementation.
If you had any micro moments that were useful in pinning down either the fraction of types or the coefficients corresponding to each type that would certainly make life easier.
from pyblp.
Thank you for your answers.
Indeed, I was looking to estimate the case when the consumer can be only of two types (A and B). At the beginning, I will not use demographic data, and I will simulate the market data, so I am free to define the consumer's distribution (I think).
I have a question relating to the introduced parameter, tau. I thought that tau would represent the fraction of the two-point distribution, like sigma represents the variability of consumers' tastes. But you mention that tau would act as pi and rho, so I am no longer sure about that.
Thank you again for your time.
from pyblp.
Right, I mentioned that tau will act a lot like pi and rho, in the sense that it's a nonlinear parameter (like pi, and sigma too), and doesn't just show up in utility (like rho).
It won't act the same as them -- that's just a pointer for where to look in the code to see what you'd have to modify to add something like tau.
from pyblp.
Related Issues (20)
- How to construct a separate pair of micro moments for each market HOT 4
- X1 formulation with only fixed effects HOT 2
- Memory issues with pyblp.differentiation_instruments HOT 4
- Demand Jacobian, markup term and first order conditions HOT 2
- Micromoments for choices within individuals HOT 10
- Boostrap the change in consumer surplus under a counterfactual scenario HOT 3
- Question: When using pyblp.parallel() to run problem.solve(), How can I make sure that each partition has enough RAM? HOT 9
- questions on price elasticity and convergence HOT 2
- Computing counterfactual shares HOT 2
- questions about different markets have different numbers of products HOT 1
- Questions on how to run simulation with different product attributes to different agents HOT 10
- Question - Is there a way to incorporate FEs in Simulation? HOT 4
- Supply-side moments for subset of markets HOT 3
- Trouble with importing PyBLP HOT 2
- ProblemResults question HOT 6
- Coding base level in categorical variables in pyblp HOT 2
- divide by zero error in "ProblemResults.compute_consumer_surpluses(eliminate_product_ids)" HOT 7
- ValueError ("The detected shape was (3,) + inhomogeneous part.") when running simulation.ipynb from the tutorial HOT 2
- Problem with including log-normally distributed random coefficients on price HOT 4
- Question: Most Efficient Way of Producing LaTeX Tables of PyBLP Results and Estimates HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyblp.