# Probit Maximum Likelihood

In this homework you should implement the maximum likelihood estimator for the probit model. To remind you, this model is defined as follows:
    $$
    \begin{align}  
    y_i  &\in \{0,1\} \\
    \Pr\{y_i=1\} &= \Phi(x_i \beta) \\
    L(\beta)   & = \Pi_{i=1}^N  \Phi(x_i \beta)^{y_i} (1-\Phi(x_i \beta))^{1-y_i} \\
    \beta  & \in \mathbb{R}^k \\
    x_i  & \sim N\left([0,0,0],\left[ \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array} \right] \right) \\
    k & = 3 
    \end{align}
    $$
    
Where $\Phi$ is the standard Normal cdf. Think of $x_i$ as a row-vector. You should proceed as follows:

1. define a data generating function with default argument `N=10000`, generating `N` simulated data points from this model. Generate the data using $\beta=[1,1.5,-0.5]$. The function should return a `Dict` as outlined in the code.
1. Define the log likelihood function, $l(\beta) = \log(L)$
1. Write a function `plotLike` to plot the log likelihood function for different parameter values. Follow the outline of that function.
1. Fill in the similare function `plotGrad`, plotting the gradient.
1. Define the function `maximize_like`. this should optimize your log likelihood function.
1. (Optional) Define the gradient of the log likelihood function and use it in another optimization `maximize_like_grad`.
1. (Optional) Define the hessian of the log likelihood function and use it in another optimization `maximize_like_grad_hess`.
1. (Optional) Use the hessian of the log likelihood function to compute the standard errors of your estimates and use it in `maximize_like_grad_se`

## Tests (NOT optional)

* The code comes with a test suite that you should fill out. 
* There are some example tests, you should make those work and maybe add other ones. 
* Please do not change anything in the file structure.


```julia

```

887a250b48c7cde40cac87800c3b9d8590368b9d
ipynb
Jupyter Notebook
questions.ipynb
jeannesorin/HWunconstrained.jl
0806ee96f74c989d44e81b7d78559095cd092c43
MIT
questions.ipynb
jeannesorin/HWunconstrained.jl
0806ee96f74c989d44e81b7d78559095cd092c43
MIT
2019-03-23T16:14:45.000Z
2019-03-28T17:00:29.000Z
questions.ipynb
jeannesorin/HWunconstrained.jl
0806ee96f74c989d44e81b7d78559095cd092c43
MIT
2019-03-18T17:07:39.000Z
2019-03-24T20:51:34.000Z
Qwen/Qwen-72B
1. YES
2. YES