TRELLIS grafics [under construction]


the basics designed
experiment
observational
study
repeated
measures
download
examples
concepts box plot scatter plot profile plot data
S-plus dot plot programs
exploration histogram
conditioning

Concepts
TRELLIS graphics are a powerful tool to display relationships for large datasets compactly in one graph page while distinguishing between different groups, i.e. to look at aspects of the data structure within each panel. With trellis you can see how the relationship between two variables changes with variations in one or more conditioning variables.

Conditioning
Conditioning can be based either on continuous variables or on discrete factors.

TRELLIS are equally useful for experimental and observational studies: by comparing each conditioned panel side-by-side and on the same scale you can see not only see if a relationship exists between two variables, but also if:

  • it holds across all levels of the conditioning variables
  • its form changes along levels of the conditioning variable
  • S-plus
    Trellis graphics were developed at Bell labs in the 90's and so named because the display - many panels arrayed into columns and rows - looks like a garden trellis. The S-plus statistical package has the most comprehensive implementation of TRELLIS: for example, see its on-line manual.
    There are on-line documents about the origin of TRELLIS in S-plus. Here is a selection:
    Trellis page at AT&T labs, Trellis pages at Insightful page1, page2, Trellis in action: case studies

    Exploratory stage
    While TRELLIS may not be that suitable for presentation of results as they are cluttered by a lot of information in a single chart, they are often invaluable at the exploratory strage. Can check prior to modelling if the variability observed in the response is constant with boxplots

    The ideas of TRELLIS graphics are also implemented in the statistical package SPSS, whose output we present below.

    A designed experiment

    In a designed experiment, 5 treatments were applied in each of 3 plots in 4 blocks and eroded soil measured in the same plot over 6 years: this gives 5x3x4x6=360 datapoints. Let's graph all raw data in a single page and join datapoints in the same plot by a straight line.
    Plot the amount of soil eroded on the y-axis against time on the x-axis for each combination of 4 blocks by 5 treatments, giving 20 panels in an array of 5 rows by 4 columns. Each panel displays the 3 replicate plots.

    Example of trellis profile plots

    TRELLIS graphics can be a quick decision making tool at the exploratory stage for the approach to take when analysing repeated measurements, i.e. measurements taken on the same experimental unit over time. I use Trellis to produce profile plots.

    here are the SPSS commands:

    GRAPH
      /SCATTERPLOT(BIVAR)=year WITH soil BY replicate
      /PANEL COLVAR=block COLOP=CROSS ROWVAR=treat ROWOP=CROSS
      /MISSING=LISTWISE .
    
    a trellis of profile plots with 20 panels arranged in an array of 5 rows/treatments by 4 columns/blocks

    Question: is the slope of a straight line an acceptable summary statistic for the amount of soil erosion in the same plot over time? Answer: it may be OK for block 4 [except for treat B] or for treat E, but what about the remaining combinations of site and treatment? Maybe not.

    Example of trellis boxplots

    here are the SPSS commands:

    EXAMINE
      VARIABLES=soil BY replicate /PLOT=BOXPLOT/STATISTICS=NONE/NOTOTAL
      /PANEL COLVAR=block COLOP=CROSS ROWVAR=treat ROWOP=CROSS .
    
    a trellis of boxplots with 20 panels arranged in an array of 5 rows/treatments by 4 columns/blocks

    Example of trellis dotplots

    here are the SPSS commands:

    GRAPH
      /SCATTERPLOT(BIVAR)=replicate WITH soil
      /PANEL COLVAR=block COLOP=CROSS ROWVAR=treat ROWOP=CROSS
      /MISSING=LISTWISE .
    
    a trellis of dotplots with 20 panels arranged in an array of 5 rows/treatments by 4 columns/blocks

    Example of trellis histograms

    here are the SPSS commands:

    GRAPH
      /HISTOGRAM=soil
      /PANEL COLVAR=treat COLOP=CROSS ROWVAR=block ROWOP=CROSS .
    
    a trellis of histograms with 20 panels arranged in an array of 5 rows/treatments by 4 columns/blocks
    Back to home page; contact Sandro Leidi; updated 1 Dec 2004