calc_theo_sercor: Calculate theoretical serial correlation at a given lag from...

View source: R/overlapping_data.R

calc_theo_sercorR Documentation

Calculate theoretical serial correlation at a given lag from overlapped data

Description

Serial correlation arises from overlapped data because some of the information is 'shared' between successive overlapping observations. The amount of serial correlation is a function of the lag between observations and the extent of the overlap. For example the serial correlation between Jan-Dec and Feb-Jan observations is higher than between Jan-Dec and Sep-Aug-next-year observations.

Usage

calc_theo_sercor(noverlap, lag)

Arguments

noverlap

The extent of the overlap, e.g. 12 means annual overlaps from monthly data. 1 means no overlap.

lag

The lag in time between two overlapped observations. The serial correlation at lags equal to or higher than noverlap is zero.

Details

The formula follows from writing each overlapping observation as the sum of noverlap independent observations and counting the extent to which these two sets overlap. Where the lag is higher than the overlap no information is shared and the theoretical serial correlation becomes zero.

Value

The theoretical serial correlation.

See Also

Other Overlapping data functions: build_theo_sercor_mtx()

Examples

calc_theo_sercor(12, 0:12)

PaulMTeggin/practechniques documentation built on Aug. 19, 2023, 4:44 p.m.