[R] dlm with constant terms

Giovanni Petris GPetris at uark.edu
Wed May 7 23:37:02 CEST 2008


> Date: Wed, 07 May 2008 13:03:14 -0400
> From: "Stoyanov, Tsvetan (MSCIBARRA)" <Tsvetan.Stoyanov at fea.com>
> Importance: normal
> Priority: normal
> Thread-topic: dlm with constant terms
> Thread-index: AciwZDz3Kl800OdmR4CQkEC8PUECZg==
> 
> Hi,
> I am trying to figure how to use dlm with constant terms
> (possibly time-dependent) added to both equations
> 	y_t = c_t + F_t\theta_t + v_t
> 	\theta_t = d_t + G_t\theta_{t-1} + w_t,
> in the way that S-PLUS Finmetrics does?
> 
> Is there any straightforward way to transform the above to
> the default setup?

I think you can do it by extending the state vector and defining a new
dlm with

    \theta^*_t = (1  1  \theta_t')'

    F^*_t = [c_t  0  F_t],

    G^*_t = [1    0    0 ]
            [0    1    0 ]
	    [0   d_t  G_t]

    W^*_t = [0   0   0 ]
            [0   0   0 ]
	    [0   0  W_t]

    m^*_0 = (1  1  m_0)

    C^*_0 = [e   0   0 ]
            [0   e   0 ]
	    [0   0  C_0]

The 'e' on the diagonal of C^*_0 should be zero, but since the matrix
must be nonsingular youcan put a very small number, such as e = 1e-8. 

Best,
Giovanni Petris


> Thanks,
> Tsvetan
> --------------------------------------------------------
> 
> NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
> 
> 

-- 

Giovanni Petris  <GPetris at uark.edu>
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/



More information about the R-help mailing list