strucUPD.plot: Plot on Structure of Unbalanced Panel Dataset.

View source: R/pdynmc_exploratory.R

strucUPD.plotR Documentation

Plot on Structure of Unbalanced Panel Dataset.

Description

strucUPD.plot Plot on cross-section and longtudinal structure of an object of class 'data.frame' containing an unbalanced panel dataset.

Usage

strucUPD.plot(
  object,
  i.name = NULL,
  t.name = NULL,
  col.range = c("gold", "darkblue"),
  plot.name = "Unbalanced panel structure",
  ...
)

Arguments

object

An object of class 'data.frame'.

i.name

Column name of cross-section identifier.

t.name

Column name of time-series identifier.

col.range

A vector of at least two colors used to visualize the structure of the unbalanced panel data set (defaults to 'gold' and 'darkblue'); must be a valid argument to col2rgb.

plot.name

A vector indicating the title of the plot (defaults to 'Unbalanced panel structure').

...

further arguments.

Value

Returns a plot for an unbalanced panel dataset contained in an object of class 'data.frame' that visualizes the structure of the data. Cross-section dimension is plotted on the ordinate, longitudinal dimension on the abscissa. Each cross-sectional observation is represented by a bar. Breaks in the bars represent missing longitudinal observations.

Author(s)

Markus Fritsch, Joachim Schnurbus

See Also

pdynmc for fitting a linear dynamic panel data model.

Examples

## Load data
data(ABdata, package = "pdynmc")
dat <- ABdata
dat[,c(4:7)] <- log(dat[,c(4:7)])

## Code example
strucUPD.plot(dat, i.name = "firm", t.name = "year")




pdynmc documentation built on Sept. 12, 2024, 7:42 a.m.