mskare69 wrote:Dear Tom,
What would be the right way to include a third variable in the original Sinclair code? Can you help me with the code you already wrote for rats so as to include prices in the model? I would try to include a third variable estimating the relationship between permanent and transitory movements in output, unemployment rate and prices and the relationship between them (but I need your help on the code).
Thanks,
Marinko
Given that the model with two observables is extremely difficult to estimate, adding a third doesn't seem very practical. In the bivariate model, the only connection between GDP and unemployment are the correlated shocks to the components. If you extend that to a trivariate model, you would need to define the model for the price variable, which takes the same form as the other two, extend to three components the diagonal concatenations and the individual model setups in
- Code: Select all
compute fyu=fy~\fu
compute cyu=cy~\cu
****
function DLMYUModelSetup
*
* Set up the individual models
*
compute DLMYModelSetup()
compute DLMUModelSetup()
*
* Combine the A matrices by diagonal concatenation
*
compute ayu=ay~\au
*
* Multiply out the factor matrix to get covariance matrix
*
compute swyu=%ltouterxx(swfactor)
end DLMYUModelSetup
****
Extend
frml zyu = zy~~zu
to a third component and change SWFACTOR to a 6 x 6 matrix rather than 4 x 4.
