[R] Uniform Gaussian Kernel
blutack
x-jess-h-x at hotmail.co.uk
Wed May 4 16:30:20 CEST 2011
I have a vector with lots of different numbers. I need to make a graph
showing the Uniform Distribution of the figures. I have created a graph
showing all the different values, but now want individual Gaussian Kernel
round each point. This is what I have but each time it comes up with an
error as I have just based it on the Normal Distribution, but I'm not sure
what I need to change to make it work. Where z is my vector.
plot(0, 0, xlim=range(0, 300), ylim=range(0, 1), pch=NA,)
for(i in 1:length(z)) {
points(z[i], 0, pch="|")
}
x = seq(-10, 10, 0.01)
for(i in 1:length(z)){
std_dev = 1
lines(x, dunif(x, z[i], sd = std_dev))
}
Any ideas? Thanks.
--
View this message in context: http://r.789695.n4.nabble.com/Uniform-Gaussian-Kernel-tp3495742p3495742.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list