Marc Girondot <marc_grt <at> yahoo.fr> writes:
> 
> Le 18/05/12 00:14, Nathan Stephens a écrit :
> > I have a very simple maximization problem where I'm solving for the vector
> > But I get inconsistent results depending on what starting values I. I've
> > tried various packages but none seem to bee the very solver in Excel. Any
> > recommendations on what packages or functions I should try?
> > [...]

> I had similar problem to solve (x were frequencies) and optimization 
> stops before to reach the global maximum. As [...] indicate[d], I fitted
>  {x}-1 values because the last one is known by the equality constraint.
> 
> For the vector constraints, I used w <- -Inf when x goes out of the limits.

Same as before:
Would you *please* post data and code, as the posting guide requests!

The variable that is left out still has some (linear) inequalities to fullfil. 
I didn't understand how you worked that out with optim() as it only allows to
include box constraints.

Hans Werner

> Finally I used Bayesian mcmc to get the convergence and it works much 
> better.
> 
> I don't know why in this case the optim does not converge.
> 
> Hope it hepls,
> 
> Marc

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to