1. Home
  2. DMADENSITY procedure

DMADENSITY procedure

Plots the empirical CDF or PDF (kernel smoothed) by groups (D.B. Baird).

Options

PLOT = string tokens What to plot (cdf, pdf, histogram); default cdf, pdf
TRANSFORMATION = string token Whether to transform the data to log base 2 (log2, none); default none
BANDWIDTH = scalar Bandwidth to use in kernel density estimates for PDF
ARRANGEMENT = string token Whether to use trellis or single plots (single, trellis); default trel
WINDOW = scalar Window number for the graphs; default 3
KEYWINDOW = scalar Window number for the key; default 0 i.e. none
DEVICE = scalar Device number on which to plot the graphs
GRAPHICSFILE = text What graphics filename template to use to save the graphs; default *

Parameters

DATA = variates or pointers Data coordinates
GROUPS = factors or texts Groups

Description

DMADENSITY plot the empirical cumulative probability density function (CDF) or probability density function (PDF) as estimated by kernel smoothing. The bandwidth for the smoothing must be specified by the BANDWIDTH option. By default the data values are untransformed, but you can set option TRANSFORMATION=log2 to transform them to logarithms base 2.

The data are specified by the DATA parameter. The data can be in a single variate. The GROUPS parameter can then supply a factor defining groups, within which the CDF and PDF are to be displayed. Alternatively, the data can be in a pointer to a set of variates. The GROUPS can be omitted, or it can supply a text defining a label for each group. By default, the plots for the groups are displayed in a trellis arrangement, but you can set option ARRANGEMENT=single to display them separately, in single plots.

The WINDOW option specifies the window to use (by default 3), and the KEYWINDOW option can specify a window for a key (by default there is none). You can use the DEVICE option to plot to a device other than the screen. The GRAPHICSFILE option specifies then supplies a template for the file names.

Options: PLOT, TRANSFORMATION, BANDWIDTH, ARRANGEMENT, WINDOW, KEYWINDOW, DEVICE, GRAPHICSFILE.

Parameters: DATA, GROUPS.

Action with RESTRICT

The DATA variate(s) can be restricted to use just a subset of the data values.

See also

Procedures: DPROBABILITY, KERNELDENSITY, PTKERNEL2D, PTK3D.

Commands for: Graphics, Microarray data.

Example

CAPTION      'DMADENSITY example'; STYLE=meta
ENQUIRE      CHANNEL=-1; EXIST=check; NAME=\
             '%GENDIR%/Data/Microarrays/Data13-6-9.gwb'
IF check
  SPLOAD     '%GENDIR%/Data/Microarrays/Data13-6-9.gwb'
  " Plot Cumulative Density of Spot Intensity (Brightness)."
  DMADENSITY [PLOT=cdf; ARRANGEMENT=trellis; TRANSFORMATION=none]\ 
             Intensity; GROUPS=Slide
  " Plot Density of Green Foreground on log 2 scale."
  DMADENSITY [PLOT=pdf; ARRANGEMENT=single; TRANSFORMATION=log2]\
             F2_Median; GROUPS=Slide
ELSE
  CAPTION    'Microarray example datasets have not been installed.'
ENDIF
Updated on March 8, 2019

Was this article helpful?