Skip to content
Prev 6105 / 15274 Next

ksmooth Function in Library ("stats")

This question has nothing to do with finance, despite the title of Carmona's 
book.  In the future, please direct non-finance questions to r-help.

The book was written quite a while ago for S-Plus.  You are using R.  The 
functions are slightly different.

Assuming for a moment that this isn't a homework assignment, the R ksmooth 
expects two series to regress, x, and  y.  Your data is univariate, and will 
thus fail with only x, per your error message.

Note also that the documentation for ksmooth says it is there only for S-Plus 
compatibility, and suggests that there are multiple better functions.

Carmona's book was good in its day, when there were no books that covered R in 
finance or time series explicitly, but now I would have to recommend Shumway 
and Stoffer, or perhaps Ruppert.  There was a thread on this list a while back 
that covered people's favorite texts for a variety of different time series 
tasks, it should be in your favorite list archive.

Regards,

    - Brian
On 05/09/2010 01:57 AM, JOSH C. CHIEN wrote: