spec.ar                package:stats                R Documentation

_E_s_t_i_m_a_t_e _S_p_e_c_t_r_a_l _D_e_n_s_i_t_y _o_f _a _T_i_m_e _S_e_r_i_e_s _f_r_o_m _A_R _F_i_t

_D_e_s_c_r_i_p_t_i_o_n:

     Fits an AR model to 'x' (or uses the existing fit) and computes
     (and by default plots) the spectral density of the fitted model.

_U_s_a_g_e:

     spec.ar(x, n.freq, order = NULL, plot = TRUE, na.action = na.fail,
             method = "yule-walker", ...)

_A_r_g_u_m_e_n_t_s:

       x: A univariate (not yet:or multivariate) time series or the
          result of a fit by 'ar'.

  n.freq: The number of points at which to plot.

   order: The order of the AR model to be fitted.  If omitted, the
          order is chosen by AIC.

    plot: Plot the periodogram?

na.action: 'NA' action function.

  method: 'method' for 'ar' fit.

     ...: Graphical arguments passed to 'plot.spec'.

_V_a_l_u_e:

     An object of class '"spec"'. The result is returned invisibly if
     'plot' is true.

_W_a_r_n_i_n_g:

     Some authors, for example Thomson (1990), warn strongly that AR
     spectra can be misleading.

_N_o_t_e:

     The multivariate case is not yet implemented.

_R_e_f_e_r_e_n_c_e_s:

     Thompson, D.J. (1990) Time series analysis of Holocene climate
     data. _Phil. Trans. Roy. Soc. A_ *330*, 601-616.

     Venables, W.N. and Ripley, B.D. (2002) _Modern Applied Statistics
     with S._ Fourth edition. Springer. (Especially page 402.)

_S_e_e _A_l_s_o:

     'ar', 'spectrum'.

_E_x_a_m_p_l_e_s:

     spec.ar(lh)

     spec.ar(ldeaths)
     spec.ar(ldeaths, method="burg")

