pdim {plm}R Documentation

Check for the dimensions of the panel

Description

This function checks the number of individuals and time observations in the panel and whether it is balanced or not.

Usage

pdim(x,...)
## S3 method for class 'pdata.frame':
pdim(x,...)
## S3 method for class 'data.frame':
pdim(x,id,time,...)

Arguments

x a data.frame or a pdata.frame,
id the individual index,
time the time index,
... further arguments.

Details

pdim is called by pdata.frame and by plm if there are some missing values.

Value

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.

Author(s)

Yves Croissant

See Also

pdata.frame and plm

Examples

library(Ecdat)
data(Produc)
pdim(Produc,"state","year")

[Package plm version 0.2-2 Index]