Java Mailing List Archive

http://www.r-help.com/

Home » R Help for Statistical Computing »

[R] constrained optimisation in R.

Iason Christodoulou

2009-07-02

Replies: Find Java Web Hosting

Author LoginPost Reply

i want to estimate parameters with maximum likelihood method with contraints (contant numbers).
for example
sum(Ai)=0 and sum(Bi)=0
i have done it without the constraints but i realised that i have to use the contraints.


Without constraints(just a part-not complete):

skellamreg_LL=function(parameters,z,design)    
{
n=length(z);
mu=parameters[1];
H=parameters[2];
Apar=parameters[3:10];    
Dpar=parameters[11:18];  

res=optim(par,skellamreg_LL,method="Nelder-Mead", hessian = FALSE, control=list(trace=1000,maxit=100000),z=z,design=x,)

_________________________________________________________________


 [[alternative HTML version deleted]]

______________________________________________
R-help@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.