load deaths;
Yt=difflag(Xt,12);
ty=1:1:length(Yt);
plot(ty,Yt,'+',ty,Yt);
suptitle('Death Data');
ylabel('Deaths differenced at lag 12')
xlabel('Time Period');
pause;
%Take first difference
Yt=diff(Yt);
%
ty=1:1:length(Yt);
plot(ty,Yt,'+',ty,Yt);
suptitle('Death Data');
ylabel('Deaths first difference')
xlabel('Time Period');pause;
meanYt=mean(Yt);
Yt=Yt-mean(Yt);
cov=acovf(Yt,20);
cor=acorf(Yt,20);
meanYt
lag=0:1:length(cov)-1;
STATS=[lag'  cov' [1;cor']]

theta1=cov(12)/cov(13)
theta12 = cov(12)/cov(2)
sigma2= cov(13)*cov(2)/cov(12)
