pdimcheck {plm} | R Documentation |
This function check the number of individuals and time observations in the panel and wheter it is balanced or not.
pdimcheck(id,time,data=NULL)
id |
a vector containing the individual index, |
time |
a vector containing the time index, |
data |
an optional data.frame . |
pdimcheck
is called by pdata.frame
and by plm
in
there are some missing values.
a list 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. |
pdata.frame
and plm
library(Ecdat) data(Produc) pdimcheck(state,year,Produc) pdimcheck(Produc$state,Produc$year)