clspec               package:polspline               R Documentation

_L_s_p_e_c: _l_o_g_s_p_l_i_n_e _e_s_t_i_m_a_t_i_o_n _o_f _a _s_p_e_c_t_r_a_l _d_i_s_t_r_i_b_u_t_i_o_n

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

     Autocorrelations, autocovariances ('clspec'), spectral densities
     and line spectrum ('dlspec'), spectral distributions ('plspec') or
     a random time series('rlspec') from a model fitted with 'lspec'.

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

     clspec(lag, fit, cov = TRUE, mm) 
     dlspec(freq, fit) 
     plspec(freq, fit, mm) 
     rlspec(n, fit, mean = 0, cosmodel = FALSE, mm)

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

     lag: vector of integer-valued lags for which the  autocorrelations
          or autocorrelations are to be computed.  

     fit: 'lspec' object, typically the result of 'lspec'.

     cov: compute autocovariances ('TRUE') or autocorrelations
          ('FALSE').  

      mm: number of points used in integration and the fft. Default is
          the  smallest power of two larger than 'max(fit\$sample,
          max(lag),1024)'  for 'clspec' and 'plspec' or the smallest
          power of two larger than 'max(fit\$sample, n, max(lag),
          1024)' for  ('rlspec').  

    freq: vector of frequencies. For 'plspec' frequencies should be
          between -pi and pi.  

       n: length of the random time series to be generated.  

    mean: mean level of the time series to be generated.  

cosmodel: indicate that the data should be generated from a model with
          constant  harmonic terms rather than a true Gaussian time
          series.  

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

     Autocovariances or autocorrelations ('clspec');  values of the
     spectral distribution at the requested frequencies. ('plspec'); 
     random time series of length 'n' ('rlspec');  or a  list with
     three components  ('dlspec'): 

       d: the  spectral density evaluated at the vector of frequencies,

 modfreq: modified frequencies of the form (2pi*j/T) that are close to
          the  frequencies that were requested,

       m: mass of the line spectrum at the modified frequencies.

_A_u_t_h_o_r(_s):

     Charles Kooperberg clk@fhcrc.org.

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

     Charles Kooperberg, Charles J. Stone, and Young K. Truong (1995). 
     Logspline Estimation of a Possibly Mixed Spectral Distribution.
     _Journal of Time Series Analysis_, *16*, 359-388.

     Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K.
     Truong.  The use of polynomial splines and their tensor products
     in extended linear modeling (with discussion) (1997).  _Annals of
     Statistics_, *25*, 1371-1470.

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

     'lspec', 'plot.lspec', 'summary.lspec'.

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

     data(co2)
     co2.detrend <- lm(co2~c(1:length(co2)))$residuals
     fit <- lspec(co2.detrend)
     clspec(0:12,fit)
     plspec((0:314)/100, fit)
     dlspec((0:314)/100, fit)
     rlspec(length(co2),fit)

