timeSeries-method-stats      package:timeSeries      R Documentation

_T_i_m_e _S_e_r_i_e_s _C_o_r_r_e_l_a_t_i_o_n_s

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

     S4 methods of stats package for 'timeSeries' objects. 

       'cov'      Computes Covariance from a 'timeSeries' object,
       'cor'      Computes Correlations from a 'timeSeries' object.
       'dcauchy'  ...
       'dnorm'    ...
       'dt'       ...

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

     ## S4 method for signature 'timeSeries':
     cov(x, y = NULL, use = "all.obs", 
         method = c("pearson", "kendall", "spearman"))
         
     ## S4 method for signature 'timeSeries':
     cor(x, y = NULL, use = "all.obs", 
         method = c("pearson", "kendall", "spearman"))

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

  method: a character string indicating which correlation coefficient
          (or  covariance) is to be computed. One of '"pearson"'
          (default),  '"kendall"', or '"spearman"', can be abbreviated. 

     use: an optional character string giving a method for computing
          covariances in the presence of missing values. This must  be
          (an abbreviation of) one of the strings '"all.obs"',
          '"complete.obs"' or '"pairwise.complete.obs"'. 

       x: an univariate object of class 'timeSeries'. 

       y: NULL (default) or a 'timeSeries' object with compatible 
          dimensions to 'x'. The default is equivalent to y = x (but 
          more efficient). 

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

     returns the covariance or correlation matrix.

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

     ## data -
        x = as.timeSeries(data(msft.dat))[, 1:4]
        x = 100*returns(x)

     ## cov -
        cov(x[, "Open"], x[, "Close"])
        cov(x)

