Can anyone tell me the trick for obtaining the smoother matrix from 
smooth.spline when there are non-unique values for x. I have the following code 
but, of course, it only works when all values of x are unique.
   
  ## get the smoother matrix (x having unique values
smooth.matrix = function(x, df){
 n = length(x);
 A = matrix(0, n, n);
 for(i in 1:n){
       y = rep(0, n); y[i]=1;
       yi = smooth.spline(x, y, df=df)$y;
       A[,i]= yi;
}
 (A+t(A))/2;
}

   
  Thanks for any assistance,
  Gregory

                
---------------------------------

---------------------------------
Get a sneak peak at messages with a handy reading pane.
        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to