lagvar: Matrix of lagged variable

Description Usage Arguments Details Value Author(s) References See Also

View source: R/pdlm.r

Description

Create a matrix of a variable lagged up to some instant

Usage

1
lagvar(var, k)

Arguments

var

a vector of the variable to lag

k

an integer indicating the number of lags to compute

Details

This function creates a matrix with k+1 columns. The columns hold var lagged from 0 to k.

It is designed to be called from within pdl.

Value

A matrix with the lagged variate.

Author(s)

Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

References

Schwartz, J. (2000) The distributed lag between air pollution and daily deaths. Epidemiology 11(3), 320–326.

Diggle, P. J. (1990) Time Series: A Biostatistical Introduction. Oxford University Press.

See Also

pdlm


wjunger/ares documentation built on Dec. 23, 2021, 5:17 p.m.