| pdim {plm} | R Documentation |
This function checks the number of individuals and time observations in the panel and whether it is balanced or not.
pdim(x,...) ## S3 method for class 'data.frame': pdim(x, indexes = NULL, ...)
x |
a "data.frame" or a "plm" object, |
indexes |
see plm.data, |
... |
further arguments. |
pdim is called by the estimation functions.
an object of class pdim containing the following elements :
nT |
a list containing n, the number of individuals,
T, the number of time observations, N the total number
of observations, |
TinT |
a list containing two vectors : Ti gives the
number of observations for each individuals and nt gives
the number of individuals observed for each period, |
balanced |
a logical value : TRUE for a balanced panel,
FALSE for an unbalanced panel, |
panel.names |
a list of character vectors : id.names
contains the names of each individual and time.names
contains the names of each period. |
Yves Croissant
#There are 595 individuals
data("Wages", package="Ecdat")
pdim(Wages, 595)
# Gasoline contains two variables which are individual and time indexes
# and are the first two variables
data("Gasoline", package="Ecdat")
pdim(Gasoline)
# Hedonic is an unbalanced panel, townid is the individual index
data("Hedonic", package="Ecdat")
pdim(Hedonic, "townid")