search for: nadaraya

Displaying 6 results from an estimated 6 matches for "nadaraya".

2013 May 23
1
FW: Kernel smoothing with bandwidth which varies with x
Hello all, I would like to use the Nadaraya-Watson estimator assuming a Gaussian kernel: So far I sued the library(sm) library(sm) x<-runif(5000) y<-rnorm(5000) plot(x,y,col='black') h1<-h.select(x,y,method='aicc') lines(ksmooth(x,y,bandwidth=h1)) which works fine. What if my data were clustered requiring a bandwid...
2023 Oct 26
1
Inquiry about bandwidth rescaling in Ksmooth
...e local polynomial estimators KernSmooth::locpoly and locpol::locpol with degree 0). However, when optimizing the bandwidth of ksmooth separately using the same loss function, I find comparable estimates to the other two estimators for a (larger) different bandwidth. To confirm this, I wrote my own Nadaraya-Watson kernel regression estimator, which is consistent with the two local polynomial estimators and shows the same discordance with ksmooth. This led me to the suspicion that the bandwidth that is passed to kmooth is rescaled or transformed within the function. Unfortunately, I was not able to co...
2005 Apr 14
1
LOCFIT: What's it doing?
...ome checking between my former `GAUSS code' and my new `R code', I came to realize LOCFIT is not quite doing what I want. I wrote the following example script: #----------------------------------------------------------------------------------------------------------------- # Plain Vanilla NADARAYA-WATSON estimator (or Local Constant regression, e.g. deg=0) # with gaussian kernel & fixed bandwidth mkern<-function(y,x,h){ Mx <- matrix(x,nrow=length(y),ncol=length(y),byrow=TRUE) Mxh <- (1/h)*dnorm((x-Mx)/h) Myxh<- (1/h)*y*dnorm((x-Mx)/h) yh <- rowMeans(Myxh)/rowMeans(Mxh) re...
2023 Oct 26
1
Inquiry about bandwidth rescaling in Ksmooth
...al polynomial estimators KernSmooth::locpoly and > locpol::locpol with degree 0). However, when optimizing the bandwidth of ksmooth separately using the same loss function, I find comparable estimates to the other two estimators for a (larger) different bandwidth. To confirm this, I wrote my own Nadaraya-Watson kernel regression estimator, which is consistent with the two local polynomial estimators and shows the same discordance with ksmooth. > > This led me to the suspicion that the bandwidth that is passed to kmooth is rescaled or transformed within the function. Unfortunately, I was not a...
2005 Dec 02
1
NA as the output of ksmooth
Dear R user, My input data, positive and negative, is complete without missing data. After running ksmooth( ) , I receive for $y , many NAs. What could be the reasons and how can I receive complete output? So many thanks for any help. Amir Safari --------------------------------- [[alternative HTML version deleted]]
2009 Sep 27
3
CRAN (and crantastic) updates this week
CRAN (and crantastic) updates this week New packages ------------ * bdoc (1.0) Michael Anderson http://crantastic.org/packages/bdoc This package contains a function that will classify DNA barcodes as well as a few test and reference data sets. * bdsmatrix (1.0) Terry Therneau http://crantastic.org/packages/bdsmatrix This is a special case of sparse matrices, used by coxme and