The j-th order autocorrelation function is defined as - correct answer rho(j) = gamma(j)/gamma(0) =
([E(X(t)-mew)*E(X(t-j)-mew)])/(E[(X(t) - mew)^2])
= (Cov(X(t),X(t-j))/Var(X(t)
for j = 0,1,2,... with -1 <= rho(j) <= 1
The plot of rho(j) against j = 0,1,2,... is called - correct answer the correlogram
For a stationary ergodic process, the ACF can be estimated by the sample moments as follows - correct
answer y bar = (1/T) * Summation from t=1 to T of y(t)
sigma hat^2 = (1/T) * Summation from t=1 to T of (y(t) - y bar)^2
for each j: r(j) = (Summation from t=j+1 to T of (y(t)-y bar)*(y(t-j)-y bar))/(Summation from t=1 to T of
(y(t)-y bar)^2)
Sample variance of r(j):
Var(r(j)) = T^-1 for j=1
Var(r(j)) = T^-1 * (1+2*summation from k=1 to j-1 of (r(k)^2)) for j > 1
Testing for autocorrelation - correct answer Also known as testing the null hypothesis that
autocorrelations are significantly different from zero
H(0): r(j) = 0 for j = 1,2,3,...,k and k < T
**Can be done with Box and Pierce (1970) or Ljung-Box (1978)
,Autocorrelation - correct answer In a longitudinal design, the correlation of one variable with itself,
measured at two different times.
Box-Pierce (1970) statistic - correct answer Q = T * Summation from j=1 to k of r(j)^2
Q ~ X^2(k) under H(0)
Ljung-Box (1978) statistic - correct answer Q = T(T+2) * Summation from j=1 to k of r(j)^2 / (T - j)
Q ~ X^2(k) under H(0)
Box-Pierce and Ljung-Box in R - correct answer Examining null hypothesis of independence in a given
time series ('portmanteau tests')
Box.test(x, lag=1, type=c("Box-Pierce","Ljung-Box") fitdf=0)
x = numeric vector or univariate time series
lag = statistic based on lag autocorrelation coefficients
type = test to be performed: partial matching used
fitdf = number of degrees of freedom to be subtracted if x is series of residuals
**Sometimes applied to the residuals from an ARMA (p, q) fit, in which case the references suggest a
better approximation to the null-hypothesis distribution is obtained by setting fitdf = p+q, provided lag >
fitdf
--> Gives value = a list with class "htest" and following components:
-statistic = value of test statistic
, -parameter = degrees of freedom of approximate chi-squared distribution of test statistic (taking fitdf
into account)
-p-value = p-value of test
-method = character string indicating which type of test was performed
-data.name = character string giving name of data
p-value - correct answer The probability level which forms basis for deciding if results are statistically
significant (not due to chance)
A general ARMA (p, q) model is defined as - correct answer the stochastic process {Y(t)} that evolves as:
Y(t) = c + phi(1)*Y(t-1) + phi(2)*Y(t-2) + ... + phi(p)*Y(t-p) + theta(1)*Epsilon(t-1) + theta(2)*Epsilon(t-2)
+ ... + theta(q)*Epsilon(t-q) + Epsilon(t)
where Epsilon(t) = Gaussian White Noise
General ARMA (p, q) model written differently - correct answer Y(t) = autoregressive (AR) part [non-
thetas] + moving average (MA) part
Gaussian White Noise (Epsilon(t)) has the following properties - correct answer E(Epsilon(t)) = 0
Var(Epsilon(t)) = E(Epsilon(t)^2) = sigma^2 for all t
Cov(Epsilon(t), Epsilon(t-j)) = E(Epsilon(t)*Epsilon(t-j)) = 0 for all j not equal to 0
Epsilon(t) ~ N(0; sigma^2)