[ADMB Users] MAR(1) -needing Var operator and Kronecker product

Mollie Brooks mbrooks at ufl.edu
Mon Oct 22 12:42:09 PDT 2012


Thanks Hans! 
This will really help the progress of ADMB in the area of state-space models. I'll take a look at it and be an alpha tester.

I ran into another issue with the MAR(1) model... Calculating the mean of the stationary distribution involves taking the inverse of a df1b2matrix. mu=inv(identity_matrix(1,n)-B)*A
error: no matching function for call to ‘inv(df1b2matrix)’
I was about to add this to Redmine, but had trouble signing in.

It seems this function is not defined for RE models. Do you plan to add this function or is there an alternative? I was told that there is a way to fit the latent states as regular parameters instead of RE.

cheers,
Mollie

On 22 Oct 2012, at 3:25 PM, H. Skaug wrote:

> Hi Mollie,
> 
> I am actually working on a library for kronecker products right now,
> as I see that as the right approach to space time models. It is mostly
> geared towards sparse matrices, but at least I have kronecker(sparse,dense)
> which should be good staring point. About vec(A) I think is
> already in the admb source, but it was lacking for random effects,
> so I wrote that.
> 
> I attaching my current code which is in constant development,
> so you can use it as a template for your own work.
> 
> Hans
> 
> 
> 
> On Mon, Oct 22, 2012 at 6:30 PM, Mollie Brooks <mbrooks at ufl.edu> wrote:
>> Hi ADMB community,
>> I'm working on an MAR(1) model. I need to compute the variance of the
>> stationary distribution using the Vec operator and the Kronecker or direct
>> matrix product.
>> I'm tying to compute equation 17 from the paper "ESTIMATING COMMUNITY
>> STABILITY AND ECOLOGICAL INTERACTIONS FROM TIME-SERIES DATA" by A.R. Ives,
>> B. Dennis, K. L. Cottingham, and S.R. Carpenter (2003)
>> It defines these as follows...
>> 
>> "The operation Vec(A) creates a column vector out of any matrix A by
>> stacking columns of A on top of each other, with the first column on the top
>> and the last column on the bottom. The often-handy algebra of the Vec
>> operator is reviewed by Searle (1982)"
>> 
>> "The Kronecker or direct matrix product of M and N is formed by scalar
>> multiplying N in turn by each element of M and arranging the results into a
>> large matrix."
>> 
>> I was wondering, has anyone in the community written code for these
>> operators, and or coded an MAR(1) model? Would you be willing to share?
>> thanks,
>> Mollie
>> 
>> Mollie Brooks
>> Postdoctoral Researcher, Ponciano Lab
>> Biology Department, University of Florida
>> http://people.biology.ufl.edu/mbrooks
>> 
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
>> 
> <kronecker.cpp>




More information about the Users mailing list