clear all
close all
clc

x = load('us2.txt');
t = x(:,1);
lgdp = log(x(:,2));
lcpi = log(x(:,3));
lm1 = log(x(:,4));
lm2 = log(x(:,5));
ir1m = x(:,6)/100;
ir3y = x(:,7)/100;

n = length(t);
cost = (n:-1:1)';

X = [ones(n,1) lgdp lcpi ir1m cost];
b1 = ols(lm1,X);

disp('Penezni agregat M1: const lgdp lcpi ir1m cost')
b1

b2 = ols(lm2,X);

disp('Penezni agregat M2: const lgdp lcpi ir1m cost')
b2

X3 = [ones(n,1) lgdp ir1m cost];
y3 = lm1 - lcpi;

b3 = ols(y3,X3);

disp('Realne penezni zustatky: const lgdp ir1m cost')
b3

X4 = [ones(n,1) ir1m cost];
X5 = [ones(n,1) ir3y cost];
y4 = lm2 -lm1;

b4 = ols(y4,X4);
b5 = ols(y4,X5);

disp('Pomer M2/M1: const ir1m cost')
b4

disp('Pomer M2/M1: const ir3y cost')
b5


























