plag {plm} | R Documentation |
Computes the lag of variables that have a time and an individual dimension
plag(x,order=1)
x |
a numeric vector or a numeric matrix for which the lag should be computed, |
order |
the order of the lag to be computed. |
a vector (or matrix) of the same dimension as x
containing the
lag values. NA
values are inserted at the correct positions
library(Ecdat) data(Produc) Produc=pdata.frame(Produc,state,year) pmean(Produc$pc) form <- pmean(log(gsp))~pmean(log(pc)) lm(form,data=Produc)