Commit 19cc38b3 authored by Marco Ratto's avatar Marco Ratto Committed by Stéphane Adjemian
Browse files

allow to start from quarterly growth rate variables

parent ce6f7671
......@@ -16,6 +16,7 @@ function [ya, yass, gya, gyass] = quarterly2annual(y,yss,GYTREND0,type,islog,aux
% 7 annual nominal from Q real and deflator
% islog 0 level (default)
% 1 log-level
% 2 growth rate Q frequency
% aux optional input used when type>4
%
%
......@@ -67,7 +68,13 @@ if isstruct(aux),
elseif type > 4,
error('TYPE>4 requires auxiliary variable!')
end
if islog
if islog == 2,
% construct loglevel out of growth rate
y = cumsum(y);
yss=0;
islog=1;
end
if islog == 1
y=exp(y+yss);
yss=exp(yss);
y=y-yss;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment