methods-stats: Base R functions applied to 'timeSeries' objects

timeSeries-method-statsR Documentation

Base R functions applied to 'timeSeries' objects

Description

Many base R statistical functions work on (the data part of) timeSeries objects without the need for special methods, e.g., var, sd, cov, cor, probability densities, and others. This page gives some examples with such functions.

See Also

colStats, colVars, and other colXXX functions

Examples

## Load Microsoft Data Set - 
   data(MSFT)
   X = MSFT[, 1:4]
   X = 100 * returns(X)

## Compute Covariance Matrix - 
   cov(X[, "Open"], X[, "Close"])
   cov(X)

cor(X)   

timeSeries documentation built on Jan. 13, 2024, 8:16 p.m.