Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
dynare
Commits
e7442bcf
Commit
e7442bcf
authored
Feb 01, 2017
by
Marco Ratto
Committed by
Stéphane Adjemian
Mar 17, 2017
Browse files
added geometric average.
Set neutral type names, replacing stock/flow/deflator.
parent
d35ee4b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/utilities/dataset/quarterly2annual.m
View file @
e7442bcf
...
...
@@ -7,9 +7,10 @@ function [ya, yass, gya, gyass] = quarterly2annual(y,yss,GYTREND0,type,islog)
% y quarterly time series
% yss steady state of y
% GYTREND0 growth rate of y
% type 1 flow (default)
% 2 deflator
% 0 stock
% type 1 sum (default)
% 2 average
% 3 last period (Q4)
% 4 geometric average
% islog 0 level (default)
% 1 log-level
%
...
...
@@ -62,6 +63,10 @@ switch type
case
3
yass
=
yss
;
tmp
=
y
;
case
4
yass
=
yss
*
(
exp
(
-
GYTREND0
*
3
/
2
));
tmp
=
(
lagged
(
y
+
yss
,
3
)
*
exp
(
-
GYTREND0
*
3
)
.*
lagged
(
y
+
yss
,
2
)
*
exp
(
-
GYTREND0
*
2
)
.*
lagged
(
y
+
yss
,
1
)
*
exp
(
-
GYTREND0
)
.*
(
y
+
yss
))
.^
(
1
/
4
);
% annualized level
tmp
=
tmp
-
yass
;
otherwise
error
(
'Wrong type input'
)
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment