janboone/applied-economics

Clarification regarding project

Closed this issue · 4 comments

Dear Jan,

My colleague and I are trying to model Gary Becker's economic model of crime. However, the model has turned out to be much harder than expected and firstly we have a question regarding the social loss minimization function presented in the model (with respect to p and f):
Capture
First of all, D(O) and C(p,O) are not specified per se, it is just mentioned how these functions change and what should be taken into account. Should we specify these functions by ourselves, and is this possible with regard to the later minimization problem?

If this is not possible, can we use empirical data and relate it to the main assumptions of the model instead of doing the above-mentioned minimization problem as our project? Furthermore, if any of this seems unreasonable we can start working on another project.

Thank you!

Best,

Luka

Indeed, you can specify these functions yourself. Make sure the specification chosen is in line with the assumptions made in the paper. If you want to minimize $L$, it is "convenient" if the function is convex etc.

Thank you for the fast response! Yes, we have defined these functions but we are still having trouble finding values for $f$ and $p$ that simultaneously determine the minimum social loss. For example, when we fix either $f$ or $p$, we can find the value of $p$ or $f$ that determines the minimum social loss as can be seen in the following picture:
Picture

But can we do this with regards to two variables at the same time?

Indeed, you can. Can you see how the following code solves your problem?

def f(x,y):
    return x**2 + y**2

sp.optimize.minimize(lambda z: f(z[0],z[1]), [1,1])

This helps, thank you very much!