jmbejara / comp-econ-sp19

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2019)
48 stars 26 forks source link

Average profits for different N #51

Closed cangubur closed 5 years ago

cangubur commented 5 years ago

When we talked about what would be an easy way to approach Q1, you said find the average profits for N=0 to 6, but isn't that wrong?

Since different markets (counties) have different populations and different population variables, shouldn't we just loop through every row and calculate profits for each county and etc.

jmbejara commented 5 years ago

We must have had a miscommunication. What you describe would indeed be wrong. I think I was discussing two different approaches you could take when you code up the log-likelihood function: you could write a "for"-loop through each observation. Or you could vectorize some of the operations. For example, give parameters theta, you could compute S,V, and F for each row in single, vectorized operations.