ASA Connect

 View Only
  • 1.  Kernel density estimates

    Posted 01-16-2016 17:46

    Does anyone have a shiny app,  applet or other interactive software that illustrates the effect of changing bandwidths, kernels etc for on0dimensional density estimation amd/or bump-hunting?

    ------------------------------
    Peter Guttorp
    Professor Emeritus
    University of Washington
    Norwegian Computing Center
    ------------------------------


  • 2.  RE: Kernel density estimates

    Posted 01-18-2016 10:43
      |   view attached

    Attached is a very simple shiny app that illustrates the effect of bandwidth on a bivariate KDE. Instructions: 1) unzip the files; 2) open the 'server.R' and 'ui.R' files in a recent version of RStudio, with the the 'shiny' package installed; 3) click the "Run App" above the code panel. The actual bandwidth is a matrix, and is selected using Scott's rule. The slider in the app is a scalar multiplier of the bandwidth matrix. This is a thin wrapper on a blog post I wrote back in September: Recipe for Computing and Sampling Multivariate Kernel Density Estimates (and Plotting Contours for 2D KDEs).

    Best,

    Matt

    ------------------------------
    Matthew S. Shotwell
    Assistant Professor
    Department of Biostatistics
    Vanderbilt University

    Attachment(s)

    zip
    mvkde-shiny.zip   1 KB 1 version


  • 3.  RE: Kernel density estimates

    Posted 01-18-2016 10:51
    Thank you very much!
    peter

    Matthew Shotwell via American Statistical Association wrote:
    00000152556703c8-c26bd6d0-0f84-4854-96bb-4343587e2f02-000000@email.amazonses.com" type="cite">
    Attached is a very simple shiny app that illustrates the effect of bandwidth on a bivariate KDE. Instructions: 1) unzip the files; 2) open the ... -posted to the "ASA Connect" community
    Please Do Not Forward, use the options to the right to forward or reply.

    ASA Connect

    Post New Message Online
    Re: Kernel density estimates
    Reply to Group Online Reply to Sender via Email
    Jan 18, 2016 10:43 AM ?| ? ?view attached
    Matthew Shotwell

    Attached is a very simple shiny app that illustrates the effect of bandwidth on a bivariate KDE. Instructions: 1) unzip the files; 2) open the 'server.R' and 'ui.R' files in a recent version of RStudio, with the the 'shiny' package installed; 3) click the "Run App" above the code panel. The actual bandwidth is a matrix, and is selected using Scott's rule. The slider in the app is a scalar multiplier of the bandwidth matrix. This is a thin wrapper on a blog post I wrote back in September: Recipe for Computing and Sampling Multivariate Kernel Density Estimates (and Plotting Contours for 2D KDEs).

    Best,

    Matt

    ------------------------------
    Matthew S. Shotwell
    Assistant Professor
    Department of Biostatistics
    Vanderbilt University
    ------------------------------
    ? Reply to Group Online ? Reply to Sender via Email ? View Thread ? Recommend ? Forward ? Flag as Inappropriate ?




    ?
    You are subscribed to "ASA Connect" as peter@stat.washington.edu. To change your subscriptions, go to My Subscriptions. To unsubscribe from this community discussion, go to Unsubscribe.



    Original Message------

    Attached is a very simple shiny app that illustrates the effect of bandwidth on a bivariate KDE. Instructions: 1) unzip the files; 2) open the 'server.R' and 'ui.R' files in a recent version of RStudio, with the the 'shiny' package installed; 3) click the "Run App" above the code panel. The actual bandwidth is a matrix, and is selected using Scott's rule. The slider in the app is a scalar multiplier of the bandwidth matrix. This is a thin wrapper on a blog post I wrote back in September: Recipe for Computing and Sampling Multivariate Kernel Density Estimates (and Plotting Contours for 2D KDEs).

    Best,

    Matt

    ------------------------------
    Matthew S. Shotwell
    Assistant Professor
    Department of Biostatistics
    Vanderbilt University
    ------------------------------


  • 4.  RE: Kernel density estimates

    Posted 01-20-2016 12:13
      |   view attached

    Attached is a movie (sorry about the ancient mpg format, but lots of viewers can still show it), with frames indexed by bandwidth, of Gaussian kernel density estimates of the Hidalgo Stamp data.  These data are very well known in the bumphunting literature, and you can find published analyses with wildly different conclusions about the number of bumps, ranging from 2 to 10.  Just look all the way through the movie, and you can see how each of those conclusions makes sense at some level.  It is a great example of why the scale space view of bandwidth selection makes a lot of sense.

    Best,

    Steve

    ------------------------------
    Steve Marron
    Univ. of North Carolina At Chapel Hill

     Video