Info
This question is closed. Reopen it to edit or answer.
Issues using fsolve while iterating
1 view (last 30 days)
Show older comments
Hi, I'd appreciate any suggestion(s) on the following:
I'm using mle for my estimation but before evaluating my likelihood function I have to solve for an auxiliary parameter, r, that can be solved from a model condition given theta (theta1 and theta2).
Given theta1 and theta2 I have to solve for r from the following equation:
y = (((pmin-r)*100)/(((pmax - r)^2)*gampdf(gaminv((pmax-pmin)/(pmax-r),theta1,theta2),theta1,theta2)))-1;
In every iteration random numbers will be generated for both theta1 and theta2 within the specified bounds in fmin. I have to modify the code to take into account the following two issues:
1.Given theta1 and theta2 the equation above might not have a solution.
2.For fsolve’s initial guess the function might not be defined. It would help to restrict r to be within (0, pmin) but I can’t specify bounds for fsolve.
thanks in advance,
Jose
0 Comments
Answers (2)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!