SAS Note SN-001844

From: tsdlist@UNX.SAS.COM
Date: Wed Mar 29 2000 - 08:44:43 EST

  • Next message: tsdlist@UNX.SAS.COM: "SAS Note V6-SPECTRA-G727"

    >>>>>>>> SAS Notes -- Copyright (c) 1991 - 1999 by SAS Institute Inc. <<<<<<<<

    SAS Note: 001844 ***ALERT NOTE*** Product: STAT

    Title:
    Bivariate kernel density estimate incorrect when computed values of p
    are unequal

    Keywords:
    INCORRSTAT INCORROUT BIVARIATE KERNEL DENSITY ESTIMATE P

    Text:
    PROC KDE will generate an incorrect bivariate kernel density estimate
    when the computed values of p-sub-x and p-sub-y are unequal. For
    details regarding the formula for p, refer to the Convolutions section
    of PROC KDE in the Online Documentation or "SAS/STAT User s Guide,
    Version 8, Volume 2".

    To circumvent this problem, do not specify a combination of values for
    the PROC KDE statement options NGRID= , GRIDL= , and GRIDU= that will
    result in unequal values of p-sub-x and p-sub-y. In general, you can
    avoid having to compute p with a simple graphical test. It is
    recommended that you overlay your data values onto a plot of the
    estimated density and observe the fit. When the estimated density is
    correct, the values of p are equal and the fit will be good. When the
    estimated density is incorrect, the values of p are unequal and the fit
    will be obviously poor. Following is an outline of the code for a
    graphical test:

      /* Output the kernel density estimate */
      proc kde data=OriginalDataSet out=KernelDensityEstimate;
        var X_variable Y_variable;
      run;

      /* create an annotate data for all of your raw data values */
      data AnnotateDataSet;
        set OriginalDataSet;
        retain xsys ysys '2' position '5' function 'label' text '*'
               color 'red';
        x=X_variable;
        y=Y_variable;
      run;

      /* annotate the raw data values onto a contour plot of the kernel
         density estimate. the density should coincide with the data
         values */
      proc gcontour data=KernelDensityEstimate;
        plot Y_variable*X_variable = density / anno= AnnotateDataSet;
      run;

    Reported Releases:
    +------------REPORTED------------+ +------FIXED-----+
    System Version Level Version Level

    AIX/R 8 M0 8 1M0
    CMS 8 M0 8 1M0
    DigitUnx 8 M0 8 1M0
    HP800 8 M0 8 1M0
    IABI 8 M0 8 1M0
    MIPS ABI 8 M0 8 1M0
    MVS 8 M0 8 1M0
    OS/2 8 M0 8 1M0
    Solaris 8 M0 8 1M0
    VMS 8 M0 8 1M0
    VMS/AXP 8 M0 8 1M0
    WIN/NT 8 M0 8 1M0
    Win2000 8 M0 8 1M0
    Win95 8 M0 8 1M0
    Win98 8 M0 8 1M0



    This archive was generated by hypermail 2b29 : Wed Mar 29 2000 - 08:48:17 EST