Box.test                 package:ts                 R Documentation

_B_o_x-_P_i_e_r_c_e _a_n_d _L_j_u_n_g-_B_o_x _T_e_s_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute the Box-Pierce or Ljung-Box test statistic for examining
     the null hypothesis of independence in the time series `x' is
     computed.

_U_s_a_g_e:

     Box.test (x, lag = 1, type=c("Box-Pierce", "Ljung-Box"))

_A_r_g_u_m_e_n_t_s:

       x: a numeric vector or univariate time series.

     lag: the statistic will be based on `lag' autocorrelation
          coefficients.

    type: test to be performed: partial matching is used.

_V_a_l_u_e:

     A list with class `"htest"' containing the following components: 

statistic: the value of the test statistic.

parameter: the degrees of freedom of the approximate chi-square
          distribution of the test statistic.

 p.value: the p-value of the test.

  method: a character string indicating which type of test was
          performed.

data.name: a character string giving the name of the data.

_N_o_t_e:

     Missing values are not handled.

_A_u_t_h_o_r(_s):

     A. Trapletti

_R_e_f_e_r_e_n_c_e_s:

     Box, G. E. P. and Pierce, D. A. (1970) Distribution of residual
     correlations in autoregressive-integrated moving average time
     series models. Journal of the American Statistical Association 65,
     1509-1526.

     Ljung, G. M. and Box, G. E. P. (1978) On a measure of lack of fit
     in time series models. Biometrika 65, 553-564.

     Harvey, A. C. (1993) Time Series Models, 2nd Edition, Harvester
     Wheatsheaf, NY, pp. 44, 45.

_E_x_a_m_p_l_e_s:

     x <- rnorm (100)
     Box.test (x, lag = 1)
     Box.test (x, lag = 1, type="Ljung")

