Learn R Programming

optsize (version 0.1.0)

serial_corr: Compute first-order serial correlation of a vector

Description

Computes the correlation between consecutive elements of a numeric vector.

Usage

serial_corr(vec)

Value

Numeric value of the serial correlation

Arguments

vec

A numeric vector