[R] Fwd: The results of your email commands

From: Rohit Pandey <rohitpandey576_at_gmail.com>
Date: Fri, 08 Apr 2011 21:56:19 +0530

Hi R community,

I posted a question on using the R maximum likelihood functions a short while ago and got an email saying that some of the content was "unprocessed". Hence, I am reposting the question just to be sure (sorry for the multiple emails if both reached you).

My question is reagarding the way we use constraints in programs like maxBFGS, etc.

We need to put two matrices into a list, containing the mutipliers on the LHS of the constraint equations and the constants on the RHS. I want to constrain the last parameter of my routine to a negative value.

Hence, I specify:
lhs=matrix(0,nrow=noOfParameters,ncol=noOfParameters) lhs[noOfParameters,noOfParameters]=-1

rhs=matrix(0,nrow=(noOfParameters))

Then I use:
constraints = list(ineqA=lhs,ineqB=rhs)
in the maxBFGS function.

However, the result is that no matter what parameters I enter (positive, negative or 0), I get an error saying that the initial value is out of bounds.

Can you please tell me what I am doing wrong?

Thanks in advance,

Rohit

        [[alternative HTML version deleted]]



R-help_at_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. Received on Fri 08 Apr 2011 - 17:37:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Apr 2011 - 17:50:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive