[ADMB Users] Fail to get convergence

dave fournier davef at otter-rsch.com
Tue Nov 11 07:36:03 PST 2014


On 11/10/2014 09:23 PM, Saang-Yoon wrote:
> Hi, Dr. Fournier and Hans.
> Attached are two TPL files:
> (1)  ssmbr3v3.TPL, which is based on Hans' link below (i.e., the page 
> in the ADMB manual).
> (2)  ssmbr3v4.TPL, which is based on Dr. Fournier's suggestion below.
> Although both files still fail to generate its corresponding COR file, 
>  the 1st TPL (i.e., ssmbr3v3.TPL) is better than the 2nd TPL (i.e., 
> ssmbr3v4.TPL).    Would you mind checking those attached TPL files?    
> FYI, following are the command for run:
>
> admb -r -s ssmbr3v3.tpl
> ssmbr3v3 -ind simdataall2.dat -ainp ssmbr3v3.pin -phase 3 -noinit
>
> admb -r -s ssmbr3v4.tpl
> ssmbr3v4 -ind simdataall2.dat -ainp ssmbr3v4.pin -phase 3 -noinit
>
> Again thank you very much.
> Saang-Yoon

The code for the choleski factor should look more like this.
I changed both and the model runs fine.


  dvar_matrix L(1,nages,1,nages);       // Cholesky factor
   L.initialize();
   L(1,1)=1;
   L(2,1)=rp/sqrt(1+rp*rp);
   L(2,2)=1/sqrt(1+rp*rp);
   L(3,2)=sp/sqrt(1+sp*sp);
   L(3,3)=1/sqrt(1+sp*sp);

However the bounds on rp and ro are probably not what you want.




>
>
> On Thursday, November 6, 2014 10:30:11 AM UTC-5, Hans wrote:
>
>     See also:
>
>     http://www.admb-project.org/examples/admb-tricks/parameterization/covariance-matrices/covariance-matrices
>     <http://www.admb-project.org/examples/admb-tricks/parameterization/covariance-matrices/covariance-matrices>
>
>     Hans
>
>     On Thu, Nov 6, 2014 at 4:23 PM, dave fournier
>     <da... at otter-rsch.com <javascript:>> wrote:
>
>         On 11/05/2014 05:10 PM, Saang-Yoon wrote:
>
>         As I said, you should work with the Choleski decomposition of
>         the correlation matrix.
>
>         In the simple 3x3 case your conditions imply that it is
>         determined by 2 parameters
>
>         r and s   with bounds a and b such that a<=r<=b.  You get a
>         and b by solving
>
>              0.0<=     r/sqrt(1+r*r)  <=0.7
>
>         The matrix is
>
>             1                               0             0
>
>              r/sqrt(1+r*r)    1/sqrt(1+r*r)                0
>
>               0                     s/sqrt(1+s*s) 1/sqrt(1+s*s)
>
>
>
>
>
>
>
>>         Hi, Dr. Fournier and others.
>>         I made some progress.   Exploring many possibilities, I found
>>         that the following assumptions help, but there is still a
>>         concern.
>>         (Assumption 1) Three age classes are not from the same
>>         cohort, and thus age class 1 and 3 are presumed to be
>>         independent.    Thus I fix the correlation coefficient
>>         between age class 1 and 3 as zero.
>>         (Assumption 2) If there is a correlation between neighbor
>>         age classes (e.g., "1 vs. 2", and "2 vs. 3"), the correlation
>>         should be positive (i.e. autocorrelation over the years).   
>>         Thus I set bounds of correlation between those neighbor
>>         classes to be positive: (e.g.,  init_bounded_number
>>         corp12(0.0,0.7,3); )
>>
>>         Then now I have the resultant COR file (i.e., convergence was
>>         made).  It was good news, but the estimates of correlation
>>         coefficients between neighbor age classes are stuck to the
>>         uppder bound, 0.7.  If I allow a wide bound
>>         (e.g., init_bounded_number corp12(0.0,0.9,3); ), then I
>>         failed to get positive definite matrices.
>>
>>         admb -r -s ssmbr3v4.tpl
>>         ssmbr3v4 -ind simdataall2.dat -ainp ssmbr3v3.pin -phase 1
>>         -noinit
>>
>>         Any advice would be appreciated.    Best Wishes,
>>         Saang-Yoon
>>
>>         On Tuesday, November 4, 2014 6:30:56 PM UTC-5, dave fournier
>>         wrote:
>>
>>             On 11/04/2014 02:58 PM, Saang-Yoon wrote:
>>
>>             Hmm.  Well its like this. Pick a number between -infinity
>>             and + infinity. Why would you expect that it would need
>>             to be positive.
>>
>>             or a matrix like
>>
>>               1 .9 .9
>>             .9 1 -.50
>>             .9 -.50 1
>>
>>             If you check you will see that just like -1 is negative,
>>             this matrix is not positive definite.
>>
>>             What you should be asking is how does one parameterize
>>             the positive definite matrices in a
>>             nice way to do nonlinear parameter estimation.
>>
>>
>>
>>>             Hi, Dr. Fournier.   Thank you very much for your
>>>             reply.   Attached is models that reflect the TPL code.  
>>>             At the moment, I have no clue about why the covariance
>>>             matrix is not positive definite.
>>>             Saang-Yoon
>>>
>>>             On Monday, November 3, 2014 2:58:49 PM UTC-5, dave
>>>             fournier wrote:
>>>
>>>                 What makes you think the covariance matrix will be
>>>                 positive definite with your parameterization?
>>>
>>>                 On Sunday, November 2, 2014 5:49:50 PM UTC-8,
>>>                 Saang-Yoon wrote:
>>>
>>>                     Hi.   There was no error in compile-link for the
>>>                     attached TPL file; i.e., I got its executable
>>>                     file.    However, I fail to get convergence
>>>                     results.     Would you mind checking the TPL?
>>>                     Following are commands for runs.
>>>
>>>                     admb -r -s ssmbr3v4.tpl
>>>                     ssmbr3v4 -ind simdataall2.dat -ainp ssmbr3v3.pin
>>>                     -phase 1 -noinit
>>>                     ssmbr3v4 -ind simdataall2.dat -ainp ssmbr3v3.pin
>>>                     -phase 9 -noinit
>>>
>>>                     Thank you.
>>>                     Saang-Yoon
>>>
>>>             -- 
>>>             You received this message because you are subscribed to
>>>             the Google Groups "admb-users" group.
>>>             To unsubscribe from this group and stop receiving emails
>>>             from it, send an email to admb-users+... at googlegroups.com.
>>>             To post to this group, send email to
>>>             admb-... at googlegroups.com.
>>>             Visit this group at
>>>             http://groups.google.com/group/admb-users
>>>             <http://groups.google.com/group/admb-users>.
>>>             For more options, visit
>>>             https://groups.google.com/d/optout
>>>             <https://groups.google.com/d/optout>.
>>
>>         -- 
>>         You received this message because you are subscribed to the
>>         Google Groups "admb-users" group.
>>         To unsubscribe from this group and stop receiving emails from
>>         it, send an email to admb-users+... at googlegroups.com
>>         <javascript:>.
>>         To post to this group, send email to
>>         admb-... at googlegroups.com <javascript:>.
>>         Visit this group at http://groups.google.com/group/admb-users
>>         <http://groups.google.com/group/admb-users>.
>>         For more options, visit https://groups.google.com/d/optout
>>         <https://groups.google.com/d/optout>.
>
>
>         -- 
>         You received this message because you are subscribed to the
>         Google Groups "admb-users" group.
>         To unsubscribe from this group and stop receiving emails from
>         it, send an email to admb-users+... at googlegroups.com
>         <javascript:>.
>         To post to this group, send email to admb-... at googlegroups.com
>         <javascript:>.
>         Visit this group at http://groups.google.com/group/admb-users
>         <http://groups.google.com/group/admb-users>.
>         For more options, visit https://groups.google.com/d/optout
>         <https://groups.google.com/d/optout>.
>
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "admb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to admb-users+unsubscribe at googlegroups.com 
> <mailto:admb-users+unsubscribe at googlegroups.com>.
> To post to this group, send email to admb-users at googlegroups.com 
> <mailto:admb-users at googlegroups.com>.
> Visit this group at http://groups.google.com/group/admb-users.
> For more options, visit https://groups.google.com/d/optout.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20141111/05576b77/attachment-0001.html>


More information about the Users mailing list