Title: Visual exploration of dependency shapes for two or more variables using SPLUS
1LECTURE 17
- Visual exploration of dependency shapes for
two (or more) variables using S-PLUS - Scatter Plot Visualization of 2D Distributions
- Trellis Conditional Distribution Plots for 2D
Data - Visualizing Higher Dimensional Data
- Scatterplot Matrices (static visualization)
- Trellis Conditioning Plots (static visualization)
- Brush and Spin (interactive, dynamic
visualization)
22D SCATTER PLOTS
- Two independent N(0,1) variables
- Scatterplots with marginal histograms
- 2D shapes of independent vs. dependent normally
distributed random variables - 2D shapes of some real data sets
- All kinds of shapes!
3Two independent N(0,1) R.V.s
Done with GUI 2D Plots pallet Can also be
done at the command line with plot(x,y), with x,
y vectors, or using plot(dmat) with dmat a
data matrix with two columns
4Scatterplot with Marginal Histograms
- Choose Graph gt Brush and Spin from the S-PLUS
toolbar, and in the dialog that appears, uncheck
the Spin Window box and check the Draw Histograms
box
5(No Transcript)
6Y1 N(4,9), Y2 N(2,1)Y1 and Y2 independent
7Y1 N(4,9), Y2 N(2,1)Y1 and Y2 with
positive dependence
8Y1 N(4,9), Y2 N(2,1)Y1 and Y2 with
negative dependence
9View the previous three scatterplots with
marginal histogramsDo just as in slide
5Marginal histograms are all much the same
10The organic data set
A positive fairly linear relation for most of the
data, plus a few outliers
11Responses of two sensors to gas in the air
Distinctly nonlinear relationship
12Stock returns versus firm size
13prim4 data see S-PLUS Help(prim4)
Elementary particle physics experiment data. Two
highly dependent variables with
interesting special structure
14TRELLIS CONDITIONAL DENSITY PLOTS
- A way of looking at the conditional distribution
of Y given Xx, using histogram or smoothed
histogram views - Demo of drag and drop GUI use
- Can also be done at the command line (see Chapter
9 of S-PLUS 6 Programmers Guide) - Also useful for higher dimensional data
- Scatter plots of y versus x conditioned on z
- More on this kind of thing later
15Two independent N(0,1) R.V.s
What should the conditional density f(y2y1) look
like for various values of y1?
16Marginal Histogram of y2, and Trellis conditional
histograms of y2 conditioned on y1
17Y1 N(4,9), Y2 N(2,1)Y1 and Y2 with
positive dependence
18Marginal Histogram of y2, and Trellis conditional
histograms of y2 conditioned on y1
19Visualizing Multi-Dimensional Data
- Scatterplot matrices (Static Views)
- Many 2D scatterplots in a single display
- Trellis Graphics (Static Views)
- Brush and Spin (Dynamic Views)
- Linked views highlighting
- Dynamic slicing
20Scatterplot Matrices
21(No Transcript)
22Trellis conditional scatter plots of returns
versus size, conditioned on book/market
Marginal scatter plot of returns (over all
values of ln.bm)
23Brush and Spin prim4 (see S-PLUS Help)