plm.data {plm}R Documentation

Data Frame Special Format for Panel Data (Deprecated)

Description

This function was once used to transform a data frame in a format suitable for using with the estimation functions of plm. New code should rather use the more versatile function pdata.frame.

Usage

plm.data(x, indexes = NULL)

Arguments

x

a data.frame,

indexes

a vector (of length one or two) indicating the (individual and time) indexes (see Details).

Details

This function is kept due to backward compatibility of old code. New code should use the function pdata.frame instead.

indexes can be:

Value

An object of class c("plm.dim", "data.frame").

Author(s)

Yves Croissant

Examples

# There are 595 individuals
data("Wages", package = "plm")
Wages <- plm.data(Wages, 595)

# Gasoline contains two variables which are individual and time indexes
# The pdata.frame is called gas
data("Gasoline", package = "plm")
Gasoline <- plm.data(Gasoline, c("country","year"))
summary(Gasoline)

# Hedonic is an unbalanced panel, townid is the individual index
data("Hedonic", package = "plm")
Hedonic <- plm.data(Hedonic, "townid")

[Package plm version 1.6-6 Index]