LagPanel: LagPanel

Description Usage Arguments Details Value Author(s) Examples

Description

Provides the first lag of a particular variable from a panel data set

Usage

1
LagPanel(variable, quantity)

Arguments

variable

a particular variable from a panel data set in the form of stacked time series; in practice; a selected singular column from a panel data set

quantity

a vector of the number of time series observations in each group; in practice, it takes the form c(T1,...Tn) since the PMG allows the numbers of time series observations to differ freely across groups (if the number of time series observations in each group is the same, then c(T,...,T) and T=T1=T2=...=Tn

Details

Provides the first lag of a particular variable from a panel data set. Preserves the original dimension of time series observations in each group, completing data lost due to lagging by inserting "NA"

Value

A lagged particular variable from a panel data set

Author(s)

Lech Kujawski, Piotr Zientara

Examples

1
2
3
4
5
6
7
8
# first import DataExp, i=1...9, T1=T2=...T9=35
data(DataExp)
DataExp[1:5,]
# then execute LagPanel
y10=data.frame(y10=DataExp[,1], row.names=row.names(DataExp))
ly10=LagPanel(variable=y10, quantity=rep(35,9))
ldebt=LagPanel(variable=DataExp[,4], quantity=rep(35,9))
cbind(y10,ly10,ldebt)[1:5,]

PooledMeanGroup documentation built on May 2, 2019, 12:40 p.m.