Displaying 17 results from an estimated 17 matches for "epanechnikov".
2012 Jul 17
1
about different bandwidths in one graph
...(Epanech.)--0.00452; Plug-in (normal)--0.0009;
Plug-in(Epanech.)--0.002.
this is the condition: N=1010 data sample is from normal distribution
N(0,0.0077^2). The grid points are taken to be [-0.05,0.05] and increment is
10. Bandwidth is taken the above h value r respectively and the kernel can
be Epanechnikov kernel or Gaussian kernel.
The following is my code:
#########################################################
# Define the Epanechnikov kernel function
kernel<-function(x){0.75*(1-x^2)*(abs(x)<=1)}
############################################################### # Define the
kernel density...
2016 Apr 22
1
npudens(np) Error missing value where TRUE/FALSE needed
...tor.
bw_cx[i,] is a 1x (2+3) vector representing the bandwidths h for each variable, which were calculated using the npcdensbw function. (no this is not a mistake, I deliberately use the conditional one)
For this I use the below function in R.
kerz <-
npudens(bws=(bw_cx[i,]),cykertype="epanechnikov",cxkertype="epanechnikov",oxkertype="liracine",tdat=tdata,edat=dat)
In version 2.15.2, this worked fine, as I was able to
retrieve the necessary density estimates with kerz$dens.
This version was installed on a very old (read very slow and
about to crash) computer.
I rec...
1999 Dec 01
1
density(kernel = "cosine") .. the `wrong cosine' ..
...(-1.2,1.2,len=501)
matplot(x, cbind(Kcos(x),Kcosine(x)), type='l', lty=1)
The big difference :
- R's version is smooth (differentiable at the border of support)
- Scott's (not really "his", of course!) version is not differentiable
but looks much closer to the Epanechnikov kernel and is hence almost
as `good' (less than half a percent of MSE loss w.r.t Epanechnikov).
Problem:
- An average user knowing some statistics literature will most probably
assume that a "cosine" kernel means the one in the literature,
*NOT* the one we have in R now...
2010 Jun 01
1
BreastCancer Dataset for Classification in kknn
...Cancer)
library(kknn)
BCancer = na.omit(BreastCancer)
d = dim(BCancer)[1]
i1 = seq(1, d, 2)
i2 = seq(2, d, 2)
t1 = BCancer[i1, ]
t2 = BCancer[i2, ]
y2 = BCancer[i2, 11]
x = 10
k = array(1:x, dim = c(x,1))
ker = array(c( "rectangular", "triangular", "epanechnikov", "biweight",
"triweight", "cos", "inv", "gaussian"), dim = c(8,1))
f = function(x, ker){
BreastCancer.kknn <- kknn(Class~., train = t1, test = t2, k = x,
kernel = ker, distance = 1)
fit = fitted(B...
2008 Feb 07
1
User-defined Kernels
Hi,
i would like to do a local linear regression but with a user-defined
function f(x,y) as kernel.
(not the typical Gaussian or Epanechnikov kernel function but some similar
function).
More, would it be possible to do a local linear regression by adding weights
to the (x,y) data points?
Many thanks in advance.
--
View this message in context: http://www.nabble.com/User-defined-Kernels-tp15335660p15335660.html
Sent from the R help maili...
2011 Jun 27
1
Kernel Density Estimation at manually specified points
Hello,
my name is Carsten. This ist my first post to R-help mailing list.
I estimate densities with the function "density" out of the package
"stats".
A simplified example:
#generation of test data
n=10
z = rnorm(n)
#density estimation
f=density(z,kernel="epanechnikov",n=n)
#evaluation
print(f$y[5])
Here I can only evaluate the estimation at given points. These points
are determined by the parameter n. By default they are equidistant
distributed on the interesting interval.
But I need to evaluate the estimation (the estimated densitiy function)
at manu...
2005 May 12
0
Package adehabitat version 1.3
...available in sp.
- The function buffer.line() allows to compute buffer
around a line
- The function distfacmap() converts one factor map
into a set of maps giving the distance to the
patches belonging to the different levels.
- The kernel home-range estimation can now be fitted
using an Epanechnikov kernel (though it is still
optional), resulting in a quicker estimation.
- The former function enfa() has been modified. It
now requires a data frame (available units) and
a vector (use of each unit). If the data consist
of a point pattern and of an object kasc, the
function data2enfa is...
2005 May 12
0
Package adehabitat version 1.3
...available in sp.
- The function buffer.line() allows to compute buffer
around a line
- The function distfacmap() converts one factor map
into a set of maps giving the distance to the
patches belonging to the different levels.
- The kernel home-range estimation can now be fitted
using an Epanechnikov kernel (though it is still
optional), resulting in a quicker estimation.
- The former function enfa() has been modified. It
now requires a data frame (available units) and
a vector (use of each unit). If the data consist
of a point pattern and of an object kasc, the
function data2enfa is...
2009 Jun 03
0
Treated - KernSmooth pckg - dpik function gives numeric(0) for kernel="epanech"
Epanechnikov kernel works if option canonical=TRUE, however it would
be good to know why it does not for for canonical=FALSE (default).
Sorry for craetaing maybe useless thread.
Best regards,
Ondra.
[[alternative HTML version deleted]]
2010 Jul 24
0
local polynomial with differnt kernal functions
Hi, R users
I need to use the function (locpoly) to fit a local poynomial regression model, The defult for kernal function is " normal" , but I need to use different kernal functions such as :Uniform,Triangular,Epanechnikov,......
Could someone help me define these functions to fit local polynomial regression model?.
Email:assaedi76@yahoo.com
Thanks alot
[[alternative HTML version deleted]]
2011 Jan 26
0
baseline hazard function
...nd Jones' recommendations in Ch. 5 of Event History Modelling.
I get the following summary(haz_1)
Number of Observations .......... 50
Censored Observations ........... 43
Method used ..................... Local
Boundary Correction Type ........ Left and Right
Kernel type ..................... Epanechnikov
Minimum Time .................... 1
Maximum Time .................... 3
Number of minimization points ... 51
Number of estimation points ..... 101
Pilot Bandwidth ................. 0.25
Smoothing Bandwidth ............. 1.27
Minimum IMSE .................... 6716.9
Can anyone provide any advice?...
2011 Jul 18
0
np package, estimating the standard errors of Klein and Spady's estimator
...g:
library(np)
N<-100
X<-matrix(c(rnorm(N,1,1), rnorm(N,0,1)), ncol=2)
BETA <-matrix(1,2,1)
Z<-X%*%BETA
L<-rlogis(N,location=0, scale=1)
Y <-as.vector(X%*%BETA+L>=0)*1
KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE,
method="kleinspady", ckertype="epanechnikov" )
KSi <- npindex(KS, errors=TRUE)
se(KSi)
But then I get as a result a vector Nx1, which I do not understand what it
is, and if I let errors=FALSE then I get a NA as a result. So, how can I get
the standard error of the estimated coefficient?
Thank you
Dimitris
--
View this message...
2011 Jul 20
0
np package, KleinSpady estimator, error when I estimate the bootstrapped standard errors
Dear all,
I am using np package in order to estimate a model with Klein and Spady
estimator. To estimate the model I use
KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE,
method="kleinspady", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2)
and to estimate beta hats standard errors I use
KSi <- npindex(KS, gradients=T, boot.num=300)
vcov(KSi)
This is fine so far, but if I want to estimate the bootstrapped standard
errors on estimates by se(KSi) then the result is NA and if I include the
argument errors=TRUE i...
2011 Jul 25
0
error in optimization when I include constant term in Klein and Spady (np package)
...0
q<-2
BETA<-matrix(1,3,1)
X<-matrix(c(rnorm(N,0,1), rnorm(N,1,1)), ncol=q)
X<-cbind(X,1)
L<-rlogis(N,location=0, scale=1)
Y <-as.vector(X%*%BETA+L>=0)*1
KS <- npindexbw(xdat=X, ydat=Y, bandwidth.compute=TRUE,
method="kleinspady", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2)
Thank you
Dimitris
--
View this message in context: http://r.789695.n4.nabble.com/error-in-optimization-when-I-include-constant-term-in-Klein-and-Spady-np-package-tp3692728p3692728.html
Sent from the R help mailing list archive at Nabble.com.
2008 Jul 25
0
Package np version 0.20-0 released to CRAN
...to
evaluate on data without bandwidths.
* npsigtest interface brought in line with other functions.
* significance tests can now be performed on npreg outputs.
* added a vignette and faq.
* summary on npconmode now properly retrieves names from bandwidth
objects.
* fixed the 6th and 8th order epanechnikov kernels.
* fixed some quietness issues.
* npplot now returns data upon request for conditional densities.
* npreg and npcdens now take the appropriate limits in some
pathological cases.
We are grateful to John Fox, Achim Zeilies, Roger Koenker, and numerous
users for their valuable feedback whi...
2008 Jul 25
0
Package np version 0.20-0 released to CRAN
...to
evaluate on data without bandwidths.
* npsigtest interface brought in line with other functions.
* significance tests can now be performed on npreg outputs.
* added a vignette and faq.
* summary on npconmode now properly retrieves names from bandwidth
objects.
* fixed the 6th and 8th order epanechnikov kernels.
* fixed some quietness issues.
* npplot now returns data upon request for conditional densities.
* npreg and npcdens now take the appropriate limits in some
pathological cases.
We are grateful to John Fox, Achim Zeilies, Roger Koenker, and numerous
users for their valuable feedback whi...
2010 Jul 26
1
After writing data in MMF using SEXP structure, can i reference in R?
...o.com>
Content-Type: text/plain
Hi, R users
???br> I need to use the function (locpoly) to fit a local poynomial
regression model, The defult for kernal function is " normal" , but???I need
to use different kernal functions such as :Uniform, Triangular,
Epanechnikov, ......
Could someone help me define these functions to fit local polynomial
regression model?.
Email:[66]assaedi76 at yahoo.com
???br> ???br> Thanks alot
[[alternative HTML version deleted]]
------------------------------
Message: 7
Date: Sat, 24 Jul 2...