Learn R Programming

plm (version 0.1-2)

lag.pserie: Lag operator for panel data

Description

Computes the lag of variables that have a time and an individual dimension.

Usage

lag.pserie(x,k=1,...)

Arguments

x
a vector of class pserie,
k
the order of the lag to be computed,
...
further arguments.

Value

  • a vector of the same length as x containing the lag values. NA values are inserted at the correct positions.

See Also

diff.pserie

Examples

Run this code
library(Ecdat)
data(Produc)
Produc=pdata.frame(Produc,"state","year")
lag(Produc$pc)
lag(Produc$pc,k=2)

Run the code above in your browser using DataLab