pvar {plm} | R Documentation |
This function checks for each variable of a panel if it has an individual and a time variation.
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, ...)
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. |
pvar
is called by pdata.frame
and by plm
in
there are some missing values.
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, |
Yves Croissant
pdata.frame
and plm
.
library(Ecdat) data(Produc) pvar(Produc,"state","year")