[ADMB Users] matrix not positive definite
davef at otter-rsch.com
Sun Feb 10 14:09:11 PST 2013
On 13-02-10 01:54 PM, Mollie Brooks wrote:
Safe mode may initialize variables so that if you are using unitialized
you could get different results between the two. In fact it is a good
test for that.
It appears that in your case temp_varcov is not initialized.
// !!!! right here
for(int k=2; k<=2; k++)
for(int l=k; l<=nobs(p); l++)//l>=k
for(int b= obsdates(1,p)+1; b<= obsdates(k,p); b++)
> A collaborator proved that the measurement error only
> variance-covariance matrix was positive definite, but didn't get
> around to the process error version. I was hoping they were similar
> I don't have a great understanding of what it takes for a matrix to be
> positive definite. I at least can say that as long as rho and sigmaSq
> are positive, then all of the matrix elements should be positive. So
> it's strange that they would ever go negative.
> I thought that maybe I had gotten the indices wrong, so I tried
> compiling in safe mode. In safe mode, none of the elements go negative
> and it seems to be positive-definite. I didn't think safe-mode to
> change the behaviour like this. I thought it would just give errors.
> On 10 Feb 2013, at 2:00 PM, dave fournier wrote:
>> On 13-02-10 10:39 AM, Mollie Brooks wrote:
>> Its pretty complicated, but the first question would be why should it
>> be positive definite.
>> Without understanding the special structure all I see is a way of
>> parameterizing a
>> symmetric matrix via a bunch of parameters. since S_ij = S_ji by
>> construction it is symmetric, but why positive definite.
>>> Thanks for the response.
>>> I'm attaching the code and a tiny simulated data set. I can send a larger simulated dataset if it helps. I also attached the R code I used to simulate the data.
>>> The attached pdf contains the formula for the variance covariance matrix as "Process Error". The "Predictions" are temporally autocorrelated latent variables that determine the Bernoulli process of whether or not there is water in the pond.
>>> Mollie Brooks
>>> Postdoctoral Researcher, Ponciano Lab
>>> Biology Department, University of Florida
>>> On 10 Feb 2013, at 11:54 AM, dave fournier wrote:
>>>> Hard to say much that isn't probably wrong without seeing your code etc.
>>>> Users mailing list
>>>> Users at admb-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users