[R] Nearest Neighbour for prediction

Liaw, Andy andy_liaw at merck.com
Mon Feb 23 05:05:47 CET 2004


I guess it depends on what you want to estimate.  knn in the VR bundle does
classification.  The two functions you mentioned are quite specifically for
spatial statistics, and do quite different things (especially Gest).  

Andy

> From: liu qin [mailto:liuqincn at yahoo.com] 
> 
> Andy:
> 
> So, what do you think about Gest{spatstat} or
> knearneigh{spdep} as
> they both claimed they are the functions to calculate
> the nearest
> neighbour distance?
> 
> Qin
> --- "Liaw, Andy" <andy_liaw at merck.com> wrote:
> > Try:
> > 
> > library(class)
> > ?knn
> > example(knn)
> > 
> > Andy
> > 
> > > From: liu qin
> > > 
> > > Does anybody know how to use nearest neighbour in
> > R to
> > > predict anything? I am stuck here. I would be
> > really
> > > really grateful if anyone could help. Thank you
> > for
> > > the help.
> > > 
> > > Qin 
> > > 
> > > Ph.D. Student
> > > U.K.
> > 
> > 
> >
> --------------------------------------------------------------
> ----------------
> > 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 (which may
> > be known outside the
> > United States as Merck Frosst, Merck Sharp & Dohme
> > or MSD and in Japan, as
> > Banyu) 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,...{{dropped}}




More information about the R-help mailing list