% PCE Inflation
clear
P = xlsread('PCEPI-2.xls', 'B12:B720')';
P = P(2,:);
T = size(P,2)
P(1)
% Input gives Arithmetic monthly inflation, percent
% 2/59 - 2/18 (709 obs)
P = 1200 * log(1 + P/100);
% Continuously compounded, annualized, percent monthly inflation
P(1)
MeanInf = mean(P)
t = 1959 + (2:710)/12;
figure
hold on
plot([1950 2020], zeros(1, 2), 'k-')
plot(t, P)
title('PCE Inflation:  Chain-type, SA, continuously compounded')
ylabel('Annualized Percent Inflation')
grid on

plots = 1;
dbeta = .01;
seed = 1;
N = 10000;
[xF, pF, alpha, betaeps, ceps, ceta, sigalpha, logl, pci, ci, ESS] = ...
      SearchBeta(P,  N, dbeta, plots, seed); 



