Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate Bresnahan Reiss-1991 Solutions Question #71

Open
richard-archer opened this issue May 27, 2019 · 1 comment
Open

Replicate Bresnahan Reiss-1991 Solutions Question #71

richard-archer opened this issue May 27, 2019 · 1 comment
Labels
HW6 Discussions related to Homework #6

Comments

@richard-archer
Copy link

The solutions for Q7 mentioned that:

"These constraints puts constraints on the parameter values. You will need to write a separate constraint function for each equality in each particular hypothesis to implement these constraints. This constraint function will be passed on to the optimizer."

Since each s_i is itself a function of N and S_i, which is itself a function of theta, how would we go about writing a log likelihood function that enforces a given constraint?

@jmbejara
Copy link
Owner

Hi @richard-archer . I wouldn't so much write a log-likelihood function that enforces the constraint (though you could do that) as write a separate constraint to feed into the optimizer.

When you say, write a log-likelihood function that enforces the constraint, I think you mean substituting the constraint into the log-likelihood function. This seems difficult in this case. Instead, you can write a function for s_n and then write function that represents s_n - s_{n+1}. The function for s_n - s_{n+1} should be equal to zero if the constraint holds. Feed this into the optimizer: https://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#constrained-minimization-of-multivariate-scalar-functions-minimize

@jmbejara jmbejara added HW7 Discussions related to Homework #7 HW6 Discussions related to Homework #6 and removed HW7 Discussions related to Homework #7 labels May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HW6 Discussions related to Homework #6
Projects
None yet
Development

No branches or pull requests

2 participants