spectrum0                package:coda                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 _a_t _z_e_r_o

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

     The spectral density at frequency zero is estimated by fitting a
     glm to the low-frequency end of the periodogram. 
     `spectrum0(x)/length(x)' estimates the variance of `mean(x)'.

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

     spectrum0(x, max.freq = 0.5, order = 1, max.length = NULL) 

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

       x: A time series.

max.freq: The glm is fitted on the frequency range (0, max.freq]

   order: Order of the polynomial to fit to the periodogram.

max.length: The data `x' is aggregated if necessary by taking batch
          means so that the length of the series is less than
          `max.length'.  If this is set to `NULL' no aggregation
          occurs.

     The minimum length of the time series.  The data x

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

     The raw periodogram is calculated for the series `x' and a
     generalized linear model with family `Gamma' and log link is
     fitted to the periodogram.

     The linear predictor is a polynomial in terms of the frequency. 
     The degree of the polynomial is determined by the parameter
     `order'.

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

     A list with the following values 

    spec: The predicted value of the spectral density at frequency
          zero.

_T_h_e_o_r_y:

     Heidelberger and Welch (1991) observed that the usual
     non-parametric estimator of the spectral density, obtained by
     smoothing the periodogram, is not appropriate for frequency zero. 
     They proposed an alternative parametric method which consisted of
     fitting a linear model to the log periodogram of the batched time
     series. Some technical problems  with model fitting in their
     original proposal can be overcome by using a generalized linear
     model.

     Batching of the data, originally proposed in order to save space,
     has the side effect of flattening the spectral density and making
     a polynomial fit more reasonable.  Fitting a polynomial of degree
     zero is equivalent to using the `batched means' method.

_N_o_t_e:

     The definition of the spectral density used here differs from that
     used by `spec.pgram'. We consider the frequency range to be
     between 0 and 0.5, not between 0 and `frequency(x)/2'.

_R_e_f_e_r_e_n_c_e_s:

     Heidelberger, P and Welch, P.D. A spectral method for confidence
     interval generation and run length control in simulations.
     Communications of the ACM, Vol 24, pp233-245, 1981.

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

     `spectrum', `glm'.

