Thank you Andy! I went thru KernSmooth package but I don't see a way to use the fitted function to do the "predict" part...
data=data.frame(z=z, x=x) datanew=data.frame(z=z, x=x) lmfit=lm(z~x, data=data) lmforecast=predict(lmfit, newdata=datanew) Am I missing anything here? Thanks! 2012/2/23 Liaw, Andy <andy_l...@merck.com> > ** > In short, pick your poison... > > Is there any particular reason why the tools that shipped with R itself > (e.g., kernSmooth) are inadequate for you? > > I like using the locfit package because it has many tools, including the > ones that the author didn't think were optimal. You may need the book to > get most mileage out of it though. > > Andy > > ------------------------------ > *From:* Michael [mailto:comtech....@gmail.com] > *Sent:* Thursday, February 23, 2012 12:25 AM > *To:* Liaw, Andy > *Cc:* Bert Gunter; r-help > > *Subject:* Re: [R] Good and modern Kernel Regression package in R with > auto-bandwidth? > > Imeant its very slow when I use "cv.aic"... > > On Wed, Feb 22, 2012 at 11:24 PM, Michael <comtech....@gmail.com> wrote: > >> Is "np" an okay package to use? >> >> I am worried about the "multi-start" thing... and also it's very slow... >> >> >> On Wed, Feb 22, 2012 at 8:35 PM, Liaw, Andy <andy_l...@merck.com> wrote: >> >>> Bert's question aside (I was going to ask about laundry, but that's much >>> harder than taxes...), my understanding of the situation is that "optimal" >>> is in the eye of the beholder. There were at least two schools of thought >>> on which is the better way of automatically selecting bandwidth, using >>> plug-in methods or CV-type. The last I check, the jury is still out. >>> >>> Andy >>> >>> > -----Original Message----- >>> > From: r-help-boun...@r-project.org >>> > [mailto:r-help-boun...@r-project.org] On Behalf Of Bert Gunter >>> > Sent: Wednesday, February 22, 2012 6:03 PM >>> > To: Michael >>> > Cc: r-help >>> > Subject: Re: [R] Good and modern Kernel Regression package in >>> > R with auto-bandwidth? >>> > >>> > Would you like it to do your your taxes for you too? :-) >>> > >>> > Bert >>> > >>> > Sent from my iPhone -- please excuse typos. >>> > >>> > On Feb 22, 2012, at 11:46 AM, Michael <comtech....@gmail.com> wrote: >>> > >>> > > Hi all, >>> > > >>> > > I am looking for a good and modern Kernel Regression >>> > package in R, which >>> > > has the following features: >>> > > >>> > > 1) It has cross-validation >>> > > 2) It can automatically choose the "optimal" bandwidth >>> > > 3) It doesn't have random effect - i.e. if I run the >>> > function at different >>> > > times on the same data-set, the results should be exactly >>> > the same... I am >>> > > trying "np", but I am seeing: >>> > > >>> > > Multistart 1 of 1 | >>> > > Multistart 1 of 1 | >>> > > ... >>> > > >>> > > It looks like in order to do the optimization, it's doing >>> > > multiple-random-start optimization... am I right? >>> > > >>> > > >>> > > Could you please give me some pointers? >>> > > >>> > > I did some google search but there are so many packages >>> > that do this... I >>> > > just wanted to find the best/modern one to use... >>> > > >>> > > Thank you! >>> > > >>> > > [[alternative HTML version deleted]] >>> > > >>> > > ______________________________________________ >>> > > R-help@r-project.org mailing list >>> > > https://stat.ethz.ch/mailman/listinfo/r-help >>> > > PLEASE do read the posting guide >>> > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> >>> > > and provide commented, minimal, self-contained, reproducible code. >>> > >>> > ______________________________________________ >>> > R-help@r-project.org mailing list >>> > https://stat.ethz.ch/mailman/listinfo/r-help >>> > PLEASE do read the posting guide >>> > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> >>> > and provide commented, minimal, self-contained, reproducible code. >>> > >>> Notice: This e-mail message, together with any attachments, contains >>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, >>> New Jersey, USA 08889), and/or its affiliates Direct contact information >>> for affiliates is available at >>> http://www.merck.com/contact/contacts.html) that may be confidential, >>> proprietary copyrighted and/or legally privileged. It is intended solely >>> for the use of the individual or entity named on this message. If you are >>> not the intended recipient, and have received this message in error, >>> please notify us immediately by reply e-mail and then delete it from >>> your system. >>> >>> >> > Notice: This e-mail message, together with any attachments, contains > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, > New Jersey, USA 08889), and/or its affiliates Direct contact information > for affiliates is available at > http://www.merck.com/contact/contacts.html) that may be confidential, > proprietary copyrighted and/or legally privileged. It is intended solely > for the use of the individual or entity named on this message. If you are > not the intended recipient, and have received this message in error, > please notify us immediately by reply e-mail and then delete it from > your system. > [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.