Learn R Programming

plm (version 0.1-2)

pvar: 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.

Value

  • an object of class pvar containing the following elements :
  • id.vara logical vector with TRUE values if the variable has individual variation, FALSE otherwise,
  • time.vara logical vector with TRUE values if the variable has time variation, FALSE otherwise,

Details

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

See Also

pdata.frame and plm.

Examples

Run this code
library(Ecdat)
data(Produc)
pvar(Produc,"state","year")

Run the code above in your browser using DataLab