similar to: Joint density kde2d works improperly?

Displaying 20 results from an estimated 4000 matches similar to: "Joint density kde2d works improperly?"

2007 Nov 26
2
2d Joint Density Plot
Hi all, I'm fairly new to R, so I'm still trying to feel out what is available to me. I would like to be able to plot joint density in a two dimensional plot where density is indicated by color or darkness gradients, like a 2d color coded topographic map. Ideally, the output would be something I could then plot other points or lines on. Currently, I'm calculating joint density with
2011 Nov 24
2
Question on density values obtained from kde2d() from package MASS
Hello, I am a little bit confused regarding the density values obtained from the function kde2d() from the package MASS because the are not in the intervall [0,1] as I would expect them to be. Here is an example: x <- c(0.0036,0.0088,0.0042,0.0022,-0.0013,0.0007,0.0028,-0.0028,0.0019,0.0026,-0.0029,-0.0081,-0.0024,0.0090,0.0088,0.0038,0.0022,0.0068,0.0089,-0.0015,-0.0062,0.0066) y <-
2010 Feb 15
4
density estimates for fixed points
Problem: Based on a n x 2 data matrix i want a kernel estimate of the bivariate density. However, i also wish to specify wich points the density should be calculated at. I can offcourse just write the full kernel density estimate as a R-code, but surely there must already exist some package for this operation? The package density(), seems to create a new matrix (depending on n), where the
2010 Feb 03
3
diagnostic plots
Dear all, does anybody ever encountered the problem with diagnostic plots? x<-rnorm(100) y<-rnorm(100) plot(lm(x~y)) It gives the following message "Waiting to confirm page change..." and nothing happens. Thanks a lot! [[alternative HTML version deleted]]
2007 Aug 10
1
kde2d error message
Hello! I am trying to do a smooth with the kde2d function, and I'm getting an error message about NAs. Does anyone have any suggestions? Does this function not do well with NAs in general? fit <- kde2d(X, Y, n=100,lims=c(range(X),range(Y))) Error in if (from == to || length.out < 2) by <- 1 : missing value where TRUE/FALSE needed Thanks in advance!! Jen [[alternative
2006 Apr 23
3
bivariate weighted kernel density estimator
Is there code for bivariate kernel density estimation? For bivariate kernels there is kde2d in MASS kde2d.g in GRASS KernSur in GenKern (list probably incomplete) but none of them seems to accept a weight parameter (like density does since R 2.2.0) -- Erich Neuwirth, University of Vienna Faculty of Computer Science Computer Supported Didactics Working Group Visit our SunSITE at
2006 Mar 13
1
Density Estimation
Hallo I am trying to use the package LocFit to follow the example given in an Introductory note of C Loader concerning density estimation. It involves the "geyser" dataset (107 observations on durations, inlc in the package). I have tried the following (using the latest version of R): fit.of <- locfit(~geyser,flim=c(1,6),alpha=c(0.15,0.9)) plot(fit.of,get.data=T,mpv=200) This
2008 Oct 04
0
difference between sm.density() and kde2d()
Dear R users, I used sm.density function in the sm package and kde2d() in the MASS package to estimate the bivariate density. Then I calculated the Kullback leibler divergence meassure between a distribution and the each of the estimated densities, but the asnwers are different. Is there any difference between the kde2d and sm.density estimates? if there is a difference, then which is the best
2006 Jan 19
2
function kde2d
Good evening, I am Marta Colombo, student at Milan's Politecnico. Thank you very much for your kindness, this mailing list is really useful. I am using the function kde2d for two-dimensional kernel density estimation and I'd like to know something more about this kind of density estimator. In particular I'd like to know: what bandwidth is used ? Thank you in advance for your attention
2005 Jan 14
1
kde2d and borders
Hallo, I want to use kde2d to visualize data on a sphere given in spherical coordinates. Now the problem is, that "phi == 2*pi = 0", so in principal I have to connect (in a graphical view) the left and right border of my plot (and the bottom and top). Has anyone any idea how to do that ? Thanks, Manuel -- ------------------------------------- Manuel Metz Sternwarte der
2006 Jun 14
1
Estimate region of highest probabilty density
Estimate region of highest probabilty density Dear R-community I have data consisting of x and y. To each pair (x,y) a z value (weight) is assigned. With kde2d I can estimate the densities on a regular grid and based on this make a contour plot (not considering the z-values). According to an earlier post in the list I adjusted the kde2d to kde2d.weighted (see code below) to estimate the
2009 Dec 02
2
Histogram probabilities >1 ????!!!
Hi everybody, well, I definitely don't understand anything. Why the hist function with freq=FALSE gives such a strange result??? R <- c(-1.10, 0.79, -1.17, -0.53, -0.26, -0.22, 0.29, -0.26, -0.26, 0.39) hist(R, freq=FALSE, breaks=10) Thanks everybody [[alternative HTML version deleted]]
2010 Jul 09
3
strange floor rounding
Dear all, might seem and easy question but I cannot figure it out. floor(100*(.58)) [1] 57 where is the trick here? And how can I end up with the right answer? Thanks a lot everybody for your help. Trafim [[alternative HTML version deleted]]
2010 Jan 13
4
<= returns wrong result? Why
Dear all, Does anybody know the probable reason why <= gives false when it should give true? These two variables are of the same type, and everything works in the cycle but then it stops when they are equal. this is the output result > Rk[47] <= RB[21] [1] FALSE > Rk[47] [1] 0.002842007 > RB[21] [1] 0.002842007 Thanks a lot. [[alternative HTML version deleted]]
2004 Nov 17
2
Cross-correlated variables in kernel density estimation
Hi, I am wondering if the kde2d 2-D kernel density estimation function in the MASS package can take into account the effect of correlations between the variables. I couldn't find any achieved information on this issue. Unfortunately, I don't have the 2002 edition of Modern Applied Statistics with S by Venables and Ripley in case it was described there. Thanks in advance. Adam
2010 Jan 14
3
plot type any symbols?
Dear all, I have a question is there a possibility to plot points with different symbols like stars, crosses? I looked at different types for plot command and didn't find anything like that. Thanks a lot. [[alternative HTML version deleted]]
2010 Sep 09
1
createDataPartition
Dear all, does anyone know how to define the structure of the required samples using function createDataPartition, meaning proportions of different types of variable in the partition? Smth like this for iris data: createDataPartition(y = c(setosa = .5, virginica = .3, versicolor = .2), times = 10, p = .7, list = FALSE) Thanks a lot for your help. Regards, Trafim [[alternative HTML version
2010 Jul 14
4
reverse string
Dear all, Are there any functions in R to reverse the order of the string. smth like reverse("abc") to get "cba"? Thanks a lot. [[alternative HTML version deleted]]
2009 Mar 17
1
help with 3-D plot of kernel density estimates
Hi, I guess I have a naive question. I use kde2d function in a standard way to estimate kernel densities of x and y (x and y are vectors) and plot them using image(). f1=kde2d(x,y) image(f1) But what if I want to see kernel estimates of three variables, x, y and z (a vector) plotted together ? Something in which x<->y is plotted and colored according to the corresponding value of z ?
2010 Jan 07
2
Graph titles from massive
Dear all, I would like to ask you if there is a possibility in R to give the names to graphs which are not const. For example, How to name each plot, or to add notes like a=x[i], b=y[i] in this cycle x<-c(1,2,3,4,5,6) y<-c(7,8,9,10,11,12) par(mfrow=c(2,3)) for (i in 1:6){ plot(x,y) } Thank you for your time and help! [[alternative HTML version deleted]]