[S] Calculation the slope and curvatuve of the LOESS model.

Alexz92 (Alexz92@aol.com)
Sat, 16 May 1998 14:47:42 EDT


Dear Splus Users:

I need to calculate the slope and the curvature of the LOESS model.

a) is there a short way of doing this in Splus given that there is no one
function that describes these points?

The way I was attemping to solve this problem was buy using finite difference
methods and using the predict() function.

Lets say I have two time series A and B where

my.model<-loess(B~A)

is there a way that I can create a function with the arguments of the loess
object, my.model, and the new value A, that I want its prediction for?

The function

get.value<-function(model,A,new.value)
{
new.x<-data.frame(A=new.value)
predict(model,newdata=new.x)
}

does not seem to work. The problem seems to be with the argument A. Is there
a way I can rewrite this function and only use two arguments (model,new.value)
and recall A buy using one of the attributes of my.model?

Once I can get prediction values for each point, I can then proceed forward
and calulate the slope and the curvature at various data points.

Any suggestions???

Alex Zirakzadeh
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news