plattice {plattice}R Documentation

Lattice plot of panel data along with the model fitted values

Description

Lattice plot of panel data along with the model fitted values.

Usage

plattice(x, rows, pcol = "blue", psize = 2, lcol = "red", lsize = 1,
legcol = "orange", xlabel = NULL, ylabel = NULL, y_labels = NULL)

Arguments

x

A data frame with 4 columns of this specific order. Column 1: the grouping variable. Column 2: the time periods. Column 3: the observed response values. Column 4: the fitted values.

rows

The number of rows the lattice plot will contain.

pcol

The colour of the points (observed response values).

psize

The size of the points (observed response values).

lcol

The colour of the line of the fitted values.

lsize

The size of the line of the fitted values.

legcol

The colour of the background of the title of each sub-graph.

xlabel

The label of the x-axis.

ylabel

The label of the y-axis.

y_labels

A vector with the numbers to appear in the y-axis. If left NULL, 10 equidistant values will appear.

Value

A lattice plot with as many diagrams as the number of groups.

Author(s)

Christos Adam and Michail Tsagris.

Examples

y <- rnorm(120, 3, 1)
yhat <- 3 * y + rnorm(120, 0, 0.4)
id <- rep( c("DENMARK", "FRANCE", "GERMANY", "GREECE", "IRELAND", "ITALY"), 20)
a <- data.frame( country = id, year = rep(2000:2019, each = 6), y = y, yhat =  yhat)
plattice(a, rows = 2)

[Package plattice version 1.0 Index]