Closed sicelyli closed 5 years ago
I just found a mistake when I defined V and F. After editing the mistakes, my neg log like is -900001059.7647647.
I don't check for nan
's in my code. After I replace the negative infinities, it doesn't look like I have any nan
s in my output. I don't know why you would be getting some if you are.
Also, btw, you might want to use numpy arrays where you can. You can replace the python loops, the list comprehension, and the numpy lists, with numpy arrays and vectorized numpy functions (e.g. np.sum
instead of sum
). This should speed things up.
Take a look at this as well: https://github.com/jmbejara/comp-econ-sp19/issues/61#issuecomment-494134881
Also, the ordering of your variables is a little different than the ordering implied by theta_br
. You can check the paper to see the ordering. The ordering that I'm using matches the comment in the HW,
We are replicating this paper for "Tire Dealers" only. Thus, we will use the following variables. For 𝑉 we will use ELD, PINC, LNHDD, FFRAC. For 𝐹 we will use LANDV. For 𝑆 , we will use TPOP, OPOP, NGRW, PGRW, OCTY.
Hi, I'm not sure how I could edit my code so it could produce the right result for log likelihood.
![Screen Shot 2019-05-20 at 5 27 49 PM](https://user-images.githubusercontent.com/49537572/58055901-e60a8900-7b24-11e9-8648-908d80d4a656.png)