Learn R Programming

plm (version 0.1-1)

plag: Lag operator for panel data

Description

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

Usage

plag(x,order=1)

Arguments

x
a numeric vector or a numeric matrix for which the lag should be computed,
order
the order of the lag to be computed.

Value

  • a vector (or matrix) of the same dimension as x containing the lag values. NA values are inserted at the correct positions

Examples

Run this code
library(Ecdat)
data(Produc)
Produc=pdata.frame(Produc,state,year)
pmean(Produc$pc)
form <- pmean(log(gsp))~pmean(log(pc))
lm(form,data=Produc)

Run the code above in your browser using DataLab