perars(y, ni, lag=NULL, ksw=0)
ni
).arcoef[i,,k]
shows $i$-th regressand of $k$-th period former.ni
) is defined by
$z(i,j) = y(ni(i-1)+j)$,
$z(i,j) = c(j) + A(1,j,0)z(i,1) + \ldots + A(j-1,j,0)z(i,j-1) + A(1,j,1)z(i-1,1) + \ldots + A(ni,j,1)z(i-1,ni) + \ldots + u(i,j)$,
where $nd$ is the number of periods, $ni$ is the number of instants in one period and $u(i,j)$ is the Gaussian white noise.
When ksw
is set to $0$, the constant term $c(j)$ is excluded.
The statistics AIC is defined by $AIC = n \log(det(v)) + 2k$,
where $n$ is the length of data, $v$ is the estimate of the innovation variance matrix and $k$ is the number of parameters.
The outputs are the estimates of the regression coefficients and innovation variance of the periodic AR model for each instant.data(Airpolution)
perars(Airpolution, ni=6, lag=2, ksw=1)
Run the code above in your browser using DataLab