 Usage:  {jhat,g,mhat} = pcad(x,xg,y,h,bn)  
 
 Input:

  x                      n x d matrix, the design 
                         
  xg                     ng x d matrix, the points where we want to estimate 
                         
  y                      n x 1 matrix, the response 
                         
  h                      d x 1 matrix or scalar, chosen bandwidth 
                         
  bn                     scalar, threshold for choosing significant directions 
                         
 Output:

  jhat                   q x 1 matrix, the set of significant directions 
                         
  g                      ng x q matrix, additive functions on principal components 
                         
  mhat                   ng x 1 matrix, estimate of regression using the 
                         significant functions 
                         
--------------------------------------------------------------
(C) MD*TECH Method and Data Technologies, 17.8.2000
