Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread Steven LeBlanc
On Oct 20, 2013, at 9:54 PM, Mark Leeds marklee...@gmail.com wrote: Bill: I didn't look at the code but I think the OP means that during the nlminb algorithm, the variance covariance parameters hit values such that the covariance matrix estimate becomes negative definite. Yes, that is

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread Mark Leeds
my mistake. since nlminb is minimizing, it should be +Inf ( so that the likelihood is large ) as you pointed out. Note that this approach is a heuristic and may not work all the time. On Mon, Oct 21, 2013 at 3:01 AM, Steven LeBlanc ores...@gmail.com wrote: On Oct 20, 2013, at

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread Prof J C Nash (U30A)
: Re: [R] nlminb() - how do I constrain the parameter vector properly? Message-ID: cahz+bwyetvzjiccaugvxstgcqmf6enw0n3mmb7jfa3okykb...@mail.gmail.com Content-Type: text/plain my mistake. since nlminb is minimizing, it should be +Inf ( so that the likelihood is large ) as you pointed

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread William Dunlap
To: William Dunlap Subject: Re: [R] nlminb() - how do I constrain the parameter vector properly? On Oct 20, 2013, at 6:41 PM, William Dunlap wdun...@tibco.com wrote: Do you mean that your objective function (given to nlminb) parameterized a positive definite matrix, P, as the elements

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread Mark Leeds
, October 20, 2013 9:35 PM To: William Dunlap Subject: Re: [R] nlminb() - how do I constrain the parameter vector properly? On Oct 20, 2013, at 6:41 PM, William Dunlap wdun...@tibco.com wrote: Do you mean that your objective function (given to nlminb) parameterized a positive definite

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread William Dunlap
() - how do I constrain the parameter vector properly? On Oct 21, 2013, at 7:52 AM, William Dunlap wdun...@tibco.com wrote: Try defining the function theta345toSigma - function(theta) { cholSigma - cbind(c(theta[3], 0), c(theta[4], theta[5])) crossprod(cholSigma) # t

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-21 Thread Mark Leeds
Software wdunlap tibco.com -Original Message- From: Steven LeBlanc [mailto:ores...@gmail.com] Sent: Monday, October 21, 2013 9:21 AM To: William Dunlap Subject: Re: [R] nlminb() - how do I constrain the parameter vector properly? On Oct 21, 2013, at 7:52 AM, William Dunlap wdun

[R] nlminb() - how do I constrain the parameter vector properly?

2013-10-20 Thread Steven LeBlanc
Greets, I'm trying to use nlminb() to estimate the parameters of a bivariate normal sample and during one of the iterations it passes a parameter vector to the likelihood function resulting in an invalid covariance matrix that causes dmvnorm() to throw an error. Thus, it seems I need to

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-20 Thread David Winsemius
On Oct 20, 2013, at 3:01 PM, Steven LeBlanc wrote: Greets, I'm trying to use nlminb() to estimate the parameters of a bivariate normal sample and during one of the iterations it passes a parameter vector to the likelihood function resulting in an invalid covariance matrix that causes

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-20 Thread William Dunlap
-project.org Subject: [R] nlminb() - how do I constrain the parameter vector properly? Greets, I'm trying to use nlminb() to estimate the parameters of a bivariate normal sample and during one of the iterations it passes a parameter vector to the likelihood function resulting in an invalid

Re: [R] nlminb() - how do I constrain the parameter vector properly?

2013-10-20 Thread Mark Leeds
Subject: [R] nlminb() - how do I constrain the parameter vector properly? Greets, I'm trying to use nlminb() to estimate the parameters of a bivariate normal sample and during one of the iterations it passes a parameter vector to the likelihood function resulting in an invalid covariance