help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with Hpfilter


From: Fenia
Subject: Problem with Hpfilter
Date: Thu, 2 Nov 2023 14:33:11 +0200

Good afternoon,
I will send you the code I wrote so you could please explain to me how to fix my problem.
When running it, there's an error near line 5 as 'hpfilter' is undefined. How do I define it, what changes should I make?
Thank you for your time,
Fenia

clear all
danish_data=[ 98.765, 100.246, 98.590; 99.437, 99.740, 99.910; 101.014, 99.925, 101.308; 100.786, 100.089, 100.192; 101.006, 99.016, 98.681; 102.018, 100.497, 102.087;100.750, 100.185, 100.105; 101.573, 100.086, 100.681; 101.502, 100.259, 103.742; 101.579, 100.596, 103.449; 101.674, 100.421, 103.933; 101.510, 100.907, 105.421; 102.082, 100.227, 104.767; 102.158, 100.570, 104.748; 102.805, 100.772, 110.400; 103.012, 101.196, 108.012; 103.273, 100.869, 109.404; 103.198, 101.620, 108.669; 104.925, 102.412, 109.736; 105.302, 102.991, 113.432]
log_danish_data = log(danish_data);
theta=1600;
[trend,cycle]=hpfilter(log_danish_data,theta);
figure(1)
subplot(2,1,1)
plot(1:106, log_danish_data(:,1),1:106, trend(:,1));
title('GDP')
hold on
grid on
subplot(2,1,2)
plot(1:106, cycle(:,1));
title('cycle')
hold on
grid on

reply via email to

[Prev in Thread] Current Thread [Next in Thread]