the np package np a package for nonparametric kernel
play

The np package np : A Package for Nonparametric Kernel The np - PowerPoint PPT Presentation

np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes The np package np : A Package for Nonparametric Kernel The


  1. np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes The np package np : A Package for Nonparametric Kernel ◮ The np package implements a variety of recently developed Smoothing with Mixed Datatypes kernel methods that seamlessly handle the mix of continuous, unordered, and ordered factor datatypes often found in applied settings Jeffrey S. Racine Tristen Hayfield ◮ The package also allows the user to create their own routines using high-level function calls Department of Economics ◮ The underlying library is based on the N c � library which is and Department of Mathematics & Statistics written in ANSI C McMaster University ◮ The underlying code is MPI aware Hamilton, ON Canada L8S 4M4 ◮ The design philosophy underlying np is simply to provide an Friday, June 16, 2006 intuitive, flexible, and extensible environment for applied kernel estimation np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes The np package The np package ◮ The np package implements a variety of recently developed ◮ The np package implements a variety of recently developed kernel methods that seamlessly handle the mix of continuous, kernel methods that seamlessly handle the mix of continuous, unordered, and ordered factor datatypes often found in unordered, and ordered factor datatypes often found in applied settings applied settings ◮ The package also allows the user to create their own routines ◮ The package also allows the user to create their own routines using high-level function calls using high-level function calls ◮ The underlying library is based on the N c ◮ The underlying library is based on the N c � library which is � library which is written in ANSI C written in ANSI C ◮ The underlying code is MPI aware ◮ The underlying code is MPI aware ◮ The design philosophy underlying np is simply to provide an ◮ The design philosophy underlying np is simply to provide an intuitive, flexible, and extensible environment for applied intuitive, flexible, and extensible environment for applied kernel estimation kernel estimation

  2. np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes The np package The np package ◮ The np package implements a variety of recently developed ◮ The np package implements a variety of recently developed kernel methods that seamlessly handle the mix of continuous, kernel methods that seamlessly handle the mix of continuous, unordered, and ordered factor datatypes often found in unordered, and ordered factor datatypes often found in applied settings applied settings ◮ The package also allows the user to create their own routines ◮ The package also allows the user to create their own routines using high-level function calls using high-level function calls ◮ The underlying library is based on the N c ◮ The underlying library is based on the N c � library which is � library which is written in ANSI C written in ANSI C ◮ The underlying code is MPI aware ◮ The underlying code is MPI aware ◮ The design philosophy underlying np is simply to provide an ◮ The design philosophy underlying np is simply to provide an intuitive, flexible, and extensible environment for applied intuitive, flexible, and extensible environment for applied kernel estimation kernel estimation np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes Workflow in np Workflow in np ◮ np handles different datatypes via the data.frame() , which ◮ np handles different datatypes via the data.frame() , which preserves a variable’s type once it has been cast (unlike preserves a variable’s type once it has been cast (unlike cbind() ) cbind() ) ◮ You create a data frame casting data according to type ◮ You create a data frame casting data according to type (continuous, factor() , ordered() ), e.g., (continuous, factor() , ordered() ), e.g., ◮ data(Italy) ◮ data(Italy) ◮ attach(Italy) ◮ attach(Italy) ◮ data < - data.frame(ordered(year),gdp) ◮ data < - data.frame(ordered(year),gdp) ◮ Next, you typically proceed as follows: ◮ Next, you typically proceed as follows: ◮ Compute appropriate bandwidths ◮ Compute appropriate bandwidths ◮ Estimate an object ◮ Estimate an object ◮ Alternately, plot the object via np.plot() ◮ Alternately, plot the object via np.plot()

  3. np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes Workflow in np Workflow in np ◮ np handles different datatypes via the data.frame() , which ◮ np handles different datatypes via the data.frame() , which preserves a variable’s type once it has been cast (unlike preserves a variable’s type once it has been cast (unlike cbind() ) cbind() ) ◮ You create a data frame casting data according to type ◮ You create a data frame casting data according to type (continuous, factor() , ordered() ), e.g., (continuous, factor() , ordered() ), e.g., ◮ data(Italy) ◮ data(Italy) ◮ attach(Italy) ◮ attach(Italy) ◮ data < - data.frame(ordered(year),gdp) ◮ data < - data.frame(ordered(year),gdp) ◮ Next, you typically proceed as follows: ◮ Next, you typically proceed as follows: ◮ Compute appropriate bandwidths ◮ Compute appropriate bandwidths ◮ Estimate an object ◮ Estimate an object ◮ Alternately, plot the object via np.plot() ◮ Alternately, plot the object via np.plot() np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes Workflow in np Workflow in np ◮ np handles different datatypes via the data.frame() , which ◮ np handles different datatypes via the data.frame() , which preserves a variable’s type once it has been cast (unlike preserves a variable’s type once it has been cast (unlike cbind() ) cbind() ) ◮ You create a data frame casting data according to type ◮ You create a data frame casting data according to type (continuous, factor() , ordered() ), e.g., (continuous, factor() , ordered() ), e.g., ◮ data(Italy) ◮ data(Italy) ◮ attach(Italy) ◮ attach(Italy) ◮ data < - data.frame(ordered(year),gdp) ◮ data < - data.frame(ordered(year),gdp) ◮ Next, you typically proceed as follows: ◮ Next, you typically proceed as follows: ◮ Compute appropriate bandwidths ◮ Compute appropriate bandwidths ◮ Estimate an object ◮ Estimate an object ◮ Alternately, plot the object via np.plot() ◮ Alternately, plot the object via np.plot()

  4. np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes Workflow in np Workflow in np ◮ np handles different datatypes via the data.frame() , which ◮ np handles different datatypes via the data.frame() , which preserves a variable’s type once it has been cast (unlike preserves a variable’s type once it has been cast (unlike cbind() ) cbind() ) ◮ You create a data frame casting data according to type ◮ You create a data frame casting data according to type (continuous, factor() , ordered() ), e.g., (continuous, factor() , ordered() ), e.g., ◮ data(Italy) ◮ data(Italy) ◮ attach(Italy) ◮ attach(Italy) ◮ data < - data.frame(ordered(year),gdp) ◮ data < - data.frame(ordered(year),gdp) ◮ Next, you typically proceed as follows: ◮ Next, you typically proceed as follows: ◮ Compute appropriate bandwidths ◮ Compute appropriate bandwidths ◮ Estimate an object ◮ Estimate an object ◮ Alternately, plot the object via np.plot() ◮ Alternately, plot the object via np.plot() np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : A Package for Nonparametric Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes np : Kernel Smoothing with Mixed Datatypes Workflow in np Workflow in np ◮ np handles different datatypes via the data.frame() , which preserves a variable’s type once it has been cast (unlike ◮ We have tried to make np sufficiently flexible to be of use to a cbind() ) wide range of users ◮ You create a data frame casting data according to type ◮ All options can be tweaked by the user (kernel function, kernel (continuous, factor() , ordered() ), e.g., order, bandwidth type, estimator type and so forth) ◮ data(Italy) ◮ One function, np.kernelsum() , allows you to create your ◮ attach(Italy) own estimators, tests, etc. ◮ data < - data.frame(ordered(year),gdp) ◮ The function np.kernelsum() is simply a call to highly ◮ Next, you typically proceed as follows: optimized C code, so you get the benefits of compiled code ◮ Compute appropriate bandwidths with the flexibility of R ◮ Estimate an object ◮ Alternately, plot the object via np.plot()

Recommend


More recommend