PDF Name
PDF
Purpose
This procedure estimates the one or two dimensional probability density
function of a given data set.
Category
Statistics
Calling Sequence
pdf, X [, Y]
Input
X: The X-coordinates of the data values.
Optional Input
Y: The Y-coordinates of the data values (for two dimensional PDFs).
Keyword Parameters
BANDWIDTH: If set, the procedure modifies the smoothing parameter size
depending upon the data density near each point. Otherwise, the
smoothing parameter is not modified.
C_COLORS: A vector of colour indices for the contoured levels. This
applies to two dimensional data only).
CHARSIZE: The size of the text characters. The default is 1.
COLOR: The colour index of the axes and text. The default is set in
!P.COLOR.
FILL: If set, the contours are filled. Otherwise, only contour lines are
plotted. This applies to two dimensional data only.
NLEVELS: The number of level values for the contour plot. This
applies to two dimensional data only.
NOVERBOSE: If set, messages are not printed.
NOPLOT: If set, the PDF is not plotted.
[X,Y]RANGE: A 2-element vector containing the minimum and maximum
[x,y]-coordinates to be plotted.
SCORE: If set, the procedure calculates the near optimal smoothing
parameter value. If not set, a value is estimated assuming a
multivariate Gaussian distribution.
[MIN,MAX]SCORE: The minimum, maximum input value for the smoothing
parameter estimation score function. The default is 0.1, 1.0.
NSCORE: The size (resolution) of the smoothing parameter estimation score
function. The default is 29 points.
NPDF: The size (resolution) of the PDF axes. The default is 31 points.
TITLE: A string containing the title of the plot.
[X,Y]TITLE: A string containing the label for the X,Y axis.
Optional Output
FSCORE: The score function for calculating the near optimal smoothing
parameter value.
[X,Y]ID: The X, Y coordinate values of the PDF array (or vector).
PDF: The probability density function array (or vector).
Uses
choose_levels.pro
odd.pro Procedure
This procedure uses formulae from Silverman (1986) to estimate the PDF.
See these references for more information:
Brunet, G. 1994. Empirical normal-mode analysis of atmospheric data.
Journal of Atmospheric Sciences, 51, 932-952.
Kimoto, M., and M. Ghil. 1993. Multiple flow regimes in the Northern
Hemisphere winter. Part I: Methodology and hemispheric regimes.
Journal of Atmospheric Sciences, 50, 2625-2643.
Silverman, B. W. 1986. Density Estimation for Statistics and Data
Analysis. Chapman and Hall, 175p.
Example
Create a vector of Gaussian noise.
x = randomn( seed, 100 )
Estimate and plot the PDF of the data. Make the best estimate.
pdf, x, BANDWIDTH=1, SCORE=1
Modification History
Written by: Daithi Stone (stoned@atm.ox.ac.uk), 2001-05-09
Modified: DAS, 2001-06-04 (modified the pilot smoothing parameter
estimate)
Modified: DAS, 2002-03-15 (modified style, streamlined eta estimator,
allowed eta estimator in 1D)
Modified: DAS, 2002-04-10 (switched std.pro to stddev)
Modified: DAS, 2003-01-30 (minorly optimised score calculation)
Modified: DAS, 2003-05-28 (added NOVERBOSE keyword)
Modified: DAS, 2004-08-20 (modified FSCORE to return output even if SCORE
is not set)
Modified: DAS, 2005-08-05 (replaced sum.pro use with total)
Modified: DAS, 2007-05-24 (removed use of constants.pro; changed faulty
normalisation method to simple calculation)
Modified: DAS, 2012-01-24 (Edited for compliance with GDL)