pvar {plm}R Documentation

Check whether variables of a panel have individual and time variations

Description

This function checks for each variable of a panel if it has an individual and a time variation.

Usage

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

Arguments

x a data.frame, a pdata.frame or a matrix object,
id a vector containing the individual index,
time a vector containing the time index,
... further arguments.

Details

pvar is called by pdata.frame and by plm in there are some missing values.

Value

an object of class pvar containing the following elements :

id.var a logical vector with TRUE values if the variable has individual variation, FALSE otherwise,
time.var a logical vector with TRUE values if the variable has time variation, FALSE otherwise,

Author(s)

Yves Croissant

See Also

pdata.frame and plm.

Examples

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

[Package plm version 0.2-2 Index]