R: Multiple Correlation

mulcor {timsac} | R Documentation

## Multiple Correlation

### Description

Estimate multiple correlation.

### Usage

      mulcor(y, lag=NULL, plot=TRUE, lag_axis=TRUE)

### Arguments

`y` | a multivariate time series.
`lag` | maximum lag. Default is 2*sqrt(n), where n is the length of the time series `y`.
`plot` | logical. If TRUE (default) correlations `cor` are plotted.
`lag_axis` | logical. If TRUE (default) with plot=TRUE, x-axis is drawn.

### Value

`cov` | covariances.
`cor` | correlations (normalized covariances).
`mean` | mean.

### References

H.Akaike and T.Nakagawa (1988) Statistical Analysis and Control of Dynamic Systems. Kluwer Academic publishers.

### Examples

      # Example 1
      y <- rnorm(1000)
      dim(y) <- c(500,2)
      mulcor(y, lag_axis=FALSE)

      # Example 2
      xorg <- rnorm(1003)
      x <- matrix(0,1000,2)
      x[,1] <- xorg[1:1000]
      x[,2] <- xorg[4:1003]+0.5*rnorm(1000)
      mulcor(x, lag=20)

[Package timsac version 1.3.5 Index]