Re: [R] Triangular distribution for kernel regression

2009-09-13 Thread Bryan
Is this option (number of nearest neighbors) translate-able into bandwidth?
In reading the kknn article, it seems like it might be but I'm still not
exactly sure how. Unfortunately this is an important issue as the end users
are used to using certain bandwidth values for their work.

It may be more efficient to ask, more generally, how would I reproduce this
command:

ksmooth(x, y, normal, bandwidth=10)

where x and y are ratio level variables, using kknn?

Thanks for your patience and continued assistance.


On Sat, Sep 12, 2009 at 5:19 PM, Gabor Grothendieck ggrothendi...@gmail.com
 wrote:

 You can specify the number of nearest neighbors.

 On Sat, Sep 12, 2009 at 5:16 PM, Bryan thespamho...@gmail.com wrote:
  I originally looked over kknn because I need to be able to specify a
  bandwidth parameter.  I am trying to replicate some previous non-R work
 in
  R, so I can't stray to far from the procedure used there.  In reading the
  paper referenced in the docs, I see that kknn can reduce to the
  Nadaraya–Watson estimator, which is where I need to be, but I'm not sure
 how
  to manipulate the bandwidth, as would be possible in other methods.  Can
 you
  clarify this at all?
 
  Bryan
 
 
 
 
 
 
 
  On Sat, Sep 12, 2009 at 3:46 PM, Gabor Grothendieck
  ggrothendi...@gmail.com wrote:
 
  What about kknn -- that was listed as having the triangular
 distribution?
 
 
  On Sat, Sep 12, 2009 at 3:42 PM, Bryan thespamho...@gmail.com wrote:
   Gabor,
  
   Thanks for your quick reply (on a weekend even!)  I've looked through
   the
   results of the search you recommended, and several related searches,
 and
   don't see anything exceptionally helpful.  Kernel regression is a
   relatively
   new analysis for me; I apologize for needing a little more direction.
  
   I've understand that it is connected to local polynomial regression
 but
   I
   can't seem to have any success from that direction either. At this
 point
   the
   only package that is giving smoothed estimates as I would expect is
   ksmooth
   - which doesn't include the appropriate distribution.
  
   Best,
   Bryan
  
  
   On Sat, Sep 12, 2009 at 1:55 PM, Gabor Grothendieck
   ggrothendi...@gmail.com wrote:
  
   Try:
  
   RSiteSearch(kernel triangular)
  
   On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com
 wrote:
Hello,
   
I am trying to get fitted/estimated values using kernel regression
and a
triangular kernel.  I have found packages that easily fit values
 from
a
kernel regression (e.g. ksmooth) but do not have a triangular
distribution
option, and density estimators that have triangular distribution
options
that I can't seem to use to produce estimated values (e.g.
 density).
 Any
help is appreciated.
   
Bryan
   
   [[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.
   
  
  
 
 


[[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.


Re: [R] Triangular distribution for kernel regression

2009-09-13 Thread Gabor Grothendieck
If by chance you have an objective function you could automatically
calculate the optimum number of nearest neighbors by cross validation
eliminating the need to set it in the first place.

On Sun, Sep 13, 2009 at 10:19 AM, Bryan thespamho...@gmail.com wrote:
 Is this option (number of nearest neighbors) translate-able into bandwidth?
 In reading the kknn article, it seems like it might be but I'm still not
 exactly sure how. Unfortunately this is an important issue as the end users
 are used to using certain bandwidth values for their work.

 It may be more efficient to ask, more generally, how would I reproduce this
 command:

 ksmooth(x, y, normal, bandwidth=10)

 where x and y are ratio level variables, using kknn?

 Thanks for your patience and continued assistance.


 On Sat, Sep 12, 2009 at 5:19 PM, Gabor Grothendieck
 ggrothendi...@gmail.com wrote:

 You can specify the number of nearest neighbors.

 On Sat, Sep 12, 2009 at 5:16 PM, Bryan thespamho...@gmail.com wrote:
  I originally looked over kknn because I need to be able to specify a
  bandwidth parameter.  I am trying to replicate some previous non-R work
  in
  R, so I can't stray to far from the procedure used there.  In reading
  the
  paper referenced in the docs, I see that kknn can reduce to the
  Nadaraya–Watson estimator, which is where I need to be, but I'm not sure
  how
  to manipulate the bandwidth, as would be possible in other methods.  Can
  you
  clarify this at all?
 
  Bryan
 
 
 
 
 
 
 
  On Sat, Sep 12, 2009 at 3:46 PM, Gabor Grothendieck
  ggrothendi...@gmail.com wrote:
 
  What about kknn -- that was listed as having the triangular
  distribution?
 
 
  On Sat, Sep 12, 2009 at 3:42 PM, Bryan thespamho...@gmail.com wrote:
   Gabor,
  
   Thanks for your quick reply (on a weekend even!)  I've looked through
   the
   results of the search you recommended, and several related searches,
   and
   don't see anything exceptionally helpful.  Kernel regression is a
   relatively
   new analysis for me; I apologize for needing a little more direction.
  
   I've understand that it is connected to local polynomial regression
   but
   I
   can't seem to have any success from that direction either. At this
   point
   the
   only package that is giving smoothed estimates as I would expect is
   ksmooth
   - which doesn't include the appropriate distribution.
  
   Best,
   Bryan
  
  
   On Sat, Sep 12, 2009 at 1:55 PM, Gabor Grothendieck
   ggrothendi...@gmail.com wrote:
  
   Try:
  
   RSiteSearch(kernel triangular)
  
   On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com
   wrote:
Hello,
   
I am trying to get fitted/estimated values using kernel regression
and a
triangular kernel.  I have found packages that easily fit values
from
a
kernel regression (e.g. ksmooth) but do not have a triangular
distribution
option, and density estimators that have triangular distribution
options
that I can't seem to use to produce estimated values (e.g.
density).
 Any
help is appreciated.
   
Bryan
   
       [[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.
   
  
  
 
 



__
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.


[R] Triangular distribution for kernel regression

2009-09-12 Thread Bryan
Hello,

I am trying to get fitted/estimated values using kernel regression and a
triangular kernel.  I have found packages that easily fit values from a
kernel regression (e.g. ksmooth) but do not have a triangular distribution
option, and density estimators that have triangular distribution options
that I can't seem to use to produce estimated values (e.g. density).  Any
help is appreciated.

Bryan

[[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.


Re: [R] Triangular distribution for kernel regression

2009-09-12 Thread Gabor Grothendieck
Try:

RSiteSearch(kernel triangular)

On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com wrote:
 Hello,

 I am trying to get fitted/estimated values using kernel regression and a
 triangular kernel.  I have found packages that easily fit values from a
 kernel regression (e.g. ksmooth) but do not have a triangular distribution
 option, and density estimators that have triangular distribution options
 that I can't seem to use to produce estimated values (e.g. density).  Any
 help is appreciated.

 Bryan

        [[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.


__
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.


Re: [R] Triangular distribution for kernel regression

2009-09-12 Thread Bryan
Gabor,

Thanks for your quick reply (on a weekend even!)  I've looked through the
results of the search you recommended, and several related searches, and
don't see anything exceptionally helpful.  Kernel regression is a relatively
new analysis for me; I apologize for needing a little more direction.

I've understand that it is connected to local polynomial regression but I
can't seem to have any success from that direction either. At this point the
only package that is giving smoothed estimates as I would expect is ksmooth
- which doesn't include the appropriate distribution.

Best,
Bryan


On Sat, Sep 12, 2009 at 1:55 PM, Gabor Grothendieck ggrothendi...@gmail.com
 wrote:

 Try:

 RSiteSearch(kernel triangular)

 On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com wrote:
  Hello,
 
  I am trying to get fitted/estimated values using kernel regression and a
  triangular kernel.  I have found packages that easily fit values from a
  kernel regression (e.g. ksmooth) but do not have a triangular
 distribution
  option, and density estimators that have triangular distribution options
  that I can't seem to use to produce estimated values (e.g. density).  Any
  help is appreciated.
 
  Bryan
 
 [[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.
 


[[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.


Re: [R] Triangular distribution for kernel regression

2009-09-12 Thread Gabor Grothendieck
What about kknn -- that was listed as having the triangular distribution?


On Sat, Sep 12, 2009 at 3:42 PM, Bryan thespamho...@gmail.com wrote:
 Gabor,

 Thanks for your quick reply (on a weekend even!)  I've looked through the
 results of the search you recommended, and several related searches, and
 don't see anything exceptionally helpful.  Kernel regression is a relatively
 new analysis for me; I apologize for needing a little more direction.

 I've understand that it is connected to local polynomial regression but I
 can't seem to have any success from that direction either. At this point the
 only package that is giving smoothed estimates as I would expect is ksmooth
 - which doesn't include the appropriate distribution.

 Best,
 Bryan


 On Sat, Sep 12, 2009 at 1:55 PM, Gabor Grothendieck
 ggrothendi...@gmail.com wrote:

 Try:

 RSiteSearch(kernel triangular)

 On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com wrote:
  Hello,
 
  I am trying to get fitted/estimated values using kernel regression and a
  triangular kernel.  I have found packages that easily fit values from a
  kernel regression (e.g. ksmooth) but do not have a triangular
  distribution
  option, and density estimators that have triangular distribution options
  that I can't seem to use to produce estimated values (e.g. density).
   Any
  help is appreciated.
 
  Bryan
 
         [[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.
 



__
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.


Re: [R] Triangular distribution for kernel regression

2009-09-12 Thread Mark Difford

Hi Brian,

 I am trying to get fitted/estimated values using kernel regression and a 
 triangular kernel.

Look at Loader's locfit package. You are likely to be pleasantly surprised.

Regards, Mark.


Bryan-65 wrote:
 
 Hello,
 
 I am trying to get fitted/estimated values using kernel regression and a
 triangular kernel.  I have found packages that easily fit values from a
 kernel regression (e.g. ksmooth) but do not have a triangular distribution
 option, and density estimators that have triangular distribution options
 that I can't seem to use to produce estimated values (e.g. density).  Any
 help is appreciated.
 
 Bryan
 
   [[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.
 
 

-- 
View this message in context: 
http://www.nabble.com/Triangular-distribution-for-kernel-regression-tp25416706p25417878.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] Triangular distribution for kernel regression

2009-09-12 Thread Bryan
I originally looked over kknn because I need to be able to specify a
bandwidth parameter.  I am trying to replicate some previous non-R work in
R, so I can't stray to far from the procedure used there.  In reading the
paper referenced in the docs, I see that kknn can reduce to the
Nadaraya–Watson estimator, which is where I need to be, but I'm not sure how
to manipulate the bandwidth, as would be possible in other methods.  Can you
clarify this at all?

Bryan







On Sat, Sep 12, 2009 at 3:46 PM, Gabor Grothendieck ggrothendi...@gmail.com
 wrote:

 What about kknn -- that was listed as having the triangular distribution?


 On Sat, Sep 12, 2009 at 3:42 PM, Bryan thespamho...@gmail.com wrote:
  Gabor,
 
  Thanks for your quick reply (on a weekend even!)  I've looked through the
  results of the search you recommended, and several related searches, and
  don't see anything exceptionally helpful.  Kernel regression is a
 relatively
  new analysis for me; I apologize for needing a little more direction.
 
  I've understand that it is connected to local polynomial regression but I
  can't seem to have any success from that direction either. At this point
 the
  only package that is giving smoothed estimates as I would expect is
 ksmooth
  - which doesn't include the appropriate distribution.
 
  Best,
  Bryan
 
 
  On Sat, Sep 12, 2009 at 1:55 PM, Gabor Grothendieck
  ggrothendi...@gmail.com wrote:
 
  Try:
 
  RSiteSearch(kernel triangular)
 
  On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com wrote:
   Hello,
  
   I am trying to get fitted/estimated values using kernel regression and
 a
   triangular kernel.  I have found packages that easily fit values from
 a
   kernel regression (e.g. ksmooth) but do not have a triangular
   distribution
   option, and density estimators that have triangular distribution
 options
   that I can't seem to use to produce estimated values (e.g. density).
Any
   help is appreciated.
  
   Bryan
  
  [[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.
  
 
 


[[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.


Re: [R] Triangular distribution for kernel regression

2009-09-12 Thread Gabor Grothendieck
You can specify the number of nearest neighbors.

On Sat, Sep 12, 2009 at 5:16 PM, Bryan thespamho...@gmail.com wrote:
 I originally looked over kknn because I need to be able to specify a
 bandwidth parameter.  I am trying to replicate some previous non-R work in
 R, so I can't stray to far from the procedure used there.  In reading the
 paper referenced in the docs, I see that kknn can reduce to the
 Nadaraya–Watson estimator, which is where I need to be, but I'm not sure how
 to manipulate the bandwidth, as would be possible in other methods.  Can you
 clarify this at all?

 Bryan







 On Sat, Sep 12, 2009 at 3:46 PM, Gabor Grothendieck
 ggrothendi...@gmail.com wrote:

 What about kknn -- that was listed as having the triangular distribution?


 On Sat, Sep 12, 2009 at 3:42 PM, Bryan thespamho...@gmail.com wrote:
  Gabor,
 
  Thanks for your quick reply (on a weekend even!)  I've looked through
  the
  results of the search you recommended, and several related searches, and
  don't see anything exceptionally helpful.  Kernel regression is a
  relatively
  new analysis for me; I apologize for needing a little more direction.
 
  I've understand that it is connected to local polynomial regression but
  I
  can't seem to have any success from that direction either. At this point
  the
  only package that is giving smoothed estimates as I would expect is
  ksmooth
  - which doesn't include the appropriate distribution.
 
  Best,
  Bryan
 
 
  On Sat, Sep 12, 2009 at 1:55 PM, Gabor Grothendieck
  ggrothendi...@gmail.com wrote:
 
  Try:
 
  RSiteSearch(kernel triangular)
 
  On Sat, Sep 12, 2009 at 1:51 PM, Bryan thespamho...@gmail.com wrote:
   Hello,
  
   I am trying to get fitted/estimated values using kernel regression
   and a
   triangular kernel.  I have found packages that easily fit values from
   a
   kernel regression (e.g. ksmooth) but do not have a triangular
   distribution
   option, and density estimators that have triangular distribution
   options
   that I can't seem to use to produce estimated values (e.g. density).
    Any
   help is appreciated.
  
   Bryan
  
          [[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.
  
 
 



__
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.