tsdiag                 package:stats                 R Documentation

_D_i_a_g_n_o_s_t_i_c _P_l_o_t_s _f_o_r _T_i_m_e-_S_e_r_i_e_s _F_i_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     A generic function to plot time-series diagnostics.

_U_s_a_g_e:

     tsdiag(object, gof.lag, ...)

_A_r_g_u_m_e_n_t_s:

  object: a fitted time-series model

 gof.lag: the maximum number of lags for a Portmanteau goodness-of-fit
          test

     ...: further arguments to be passed to particular methods

_D_e_t_a_i_l_s:

     This is a generic function. It will generally plot the residuals,
     often standadized, the autocorrelation function of the residuals,
     and the p-values of a Portmanteau test for all lags up to
     'gof.lag'.

     The methods for 'arima' and 'StructTS' objects plots residuals
     scaled by the estimate of their (individual) variance, and use the
     Ljung-Box version of the portmanteau test.

_V_a_l_u_e:

     None. Diagnostics are plotted.

_S_e_e _A_l_s_o:

     'arima', 'StructTS', 'Box.test'

_E_x_a_m_p_l_e_s:

     ## Not run: fit <- arima(lh, c(1,0,0))
     tsdiag(fit)

     ## see also examples(arima)

     (fit <- StructTS(log10(JohnsonJohnson), type="BSM"))
     tsdiag(fit)
     ## End(Not run)

