hw4.pdf - HW4 Mourya Karan Reddy 5564234 Q1 a...

This preview shows page 1 - 3 out of 8 pages.

HW4Mourya Karan Reddy - 55642343/31/2020Q1a)load("~/Desktop/Spring 20/STAT 5511 - Time Series Analysis/HW/HW 4/HW4dat.rsav")len =length(xx)y =as.matrix(xx)a =acf(xx,plot =FALSE,lag.max=100,type ="covariance")a = a$acfi =1:lenGam =matrix(0,nrow =len,ncol =len)for(pini){for(qini){Gam[p,q] <- a[abs(p-q)+1]}}se =1:25for(iinse){t =96+iy[t] =1.34*y[t-1]-0.48*y[t-2]count =1k = ig =1:leng =0*gz =1while(k<len+1){g[z] = a[k]z = z+1k = k+1}g =as.matrix(g)P = a[1]-t(g)%*%solve(Gam)%*%gse[i] =sqrt(P)}forward = y[97:121]y =rev(xx)y=as.matrix(y)a =acf(xx,plot =FALSE,lag.max=100,type ="covariance")a = a$acfi =1:lenGam =matrix(0,nrow =len,ncol =len)1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture