function [P0,P,Q] = ara2arq(P0a,Pa,Qa)
%ARA2ARQ   converts estimates for an annual vector AR process to quarterly
%
%             s[t+1] = P0+P*s[t]+Q*e[t+1],  t quarterly
%
%          implies
%
%             s[t+4] = (I+P+P^2+P^3)*P0 + P^4*s[t]
%                        +(Q*e[t+4]+P*Q*e[t+3]+P^2*Q*e[t+2]+P^3*Q*e[t+1])
% 
%          or s[t+1] = P0a + Pa*s[t] + Qa e[t+1],  t annual
%
%          ==> P    = Pa^(1/4)
%              P0   = (I+P+P^2+P^3)\P0a
%              Q*Q' = X-P*X*P', where X solves X=Pa*X*Pa'-Qa*Qa'
%             

%          Ellen McGrattan, 11-7-06

n  = length(P0a);
P  = real(Pa^(1/4));
P0 = (eye(n)+P+P*P+P*P*P)\P0a;
X  = dlyap(Pa,Qa*Qa');
Q  = chol(X-P*X*P')';
