similar to: 2D density contour plot

Displaying 20 results from an estimated 20000 matches similar to: "2D density contour plot"

2006 May 11
1
Conditional contour plots for estimated density functions using Lattice
Does anybody here have a suggestion for a clever way of creating contour plots for estimated bivariate density functions conditional on a factor? The contourplot function in the 'lattice' package only accepts data that are on the form 'z ~ x * y', not on the form 'x,y' or 'y~x'; otherwise I could probably have used the panel function to do the needed conversion.
2012 Jul 03
1
saving contour() plot info
{ I think this message got rejected at the 1st attempt - trying again} R 2.15.1 , windows XP I have a very non-stationary bivariate time-series - say {xt,yt} t=1 ... lots. I want to do a bivariate density contour-plot of the whole series and then step through the series 1 second at a time plotting that second's {x,y} subset on top of the contour plot and losing the previous
2020 Oct 09
2
2 D density plot interpretation and manipulating the data
> My understanding is that this represents bivariate normal > approximation of the data which uses the kernel density function to > test for inclusion within a level set. (please correct me) You can fit a bivariate normal distribution by computing five parameters. Two means, two standard deviations (or two variances) and one correlation (or covariance) coefficient. The bivariate normal
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Abby, thank you for getting back to me and for this useful information. I'm trying to detect the outliers in my distribution based of mean and variance. Can I see that from the plot I provided? Would outliers be outside of ellipses? If so how do I extract those from my data frame, based on which parameter? So I am trying to connect outliers based on what the plot is showing: s <-
2007 Oct 04
3
Contour plot (level curves)
Hi all, I have a sample of n values from a bivariate distribution (from a MCMC procedure). How could I draw a contour plot of "the joint density" based on that sample ? Sorry if I was not too clear. Thans in advance, Regards, Caio [[alternative HTML version deleted]]
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Bert, Another confrontational response from you... You might have noticed that I use the word "outlier" carefully in this post and only in relation to the plotted ellipses. I do not know the underlying algorithm of geom_density_2d() and therefore I am having an issue of how to interpret the plot. I was hoping someone here knows that and can help me. Ana On Fri, Oct 9, 2020 at
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Abby, Thanks for getting back to me, yes I believe I did that by doing this: SNP$density <- get_density(SNP$mean, SNP$var) > summary(SNP$density) Min. 1st Qu. Median Mean 3rd Qu. Max. 0 383 696 738 1170 1789 where get_density() is function from here: https://slowkow.com/notes/ggplot2-color-by-density/ and keep only entries with density > 400
2020 Oct 09
2
2 D density plot interpretation and manipulating the data
I recommend that you consult with a local statistical expert. Much of what you say (outliers?!?) seems to make little sense, and your statistical knowledge seems minimal. Perhaps more to the point, none of your questions can be properly answered without subject matter context, which this list is not designed to provide. That's why I believe you need local expertise. Bert Gunter "The
2012 Mar 03
2
contour for plotting confidence interval on scatter plot of bivariate normal distribution
Dear all, I created a bivariate normal distribution: set.seed(138813) n<-100 x<-rnorm(n); y<-rnorm(n) and plotted a scatterplot of it: plot(x,y) Now I'd like to add the 2D-standard deviation. I found a thread regarding plotting arbitrary confidence boundaries from Pascal H?nggi http://www.mail-archive.com/r-help at r-project.org/msg24013.html which cites the even older thread
2003 Sep 01
0
Re: Plotting bivariate normal distributions.
You'll find that it is a lot easier to do it in R: # lets first simulate a bivariate normal sample library(MASS) bivn <- mvrnorm(1000, mu = c(0, 0), Sigma = matrix(c(1, .5, .5, 1), 2)) # now we do a kernel density estimate bivn.kde <- kde2d(bivn[,1], bivn[,2], n = 50) # now plot your results contour(bivn.kde) image(bivn.kde) persp(bivn.kde, phi = 45, theta = 30) # fancy contour with
2020 Oct 09
3
2 D density plot interpretation and manipulating the data
You could assign a density value to each point. Maybe you've done that already...? Then trim the lowest n (number of) data points Or trim the lowest p (proportion of) data points. e.g. Remove the data points with the 20 lowest density values. Or remove the data points with the lowest 5% of density values. I'll let you decide whether that is a good idea or a bad idea. And if it's a
2012 Apr 25
2
comparison of bivariate normal distributions
sorry for cross-posting Dear all, I have tow (several) bivariate distributions with a known mean and variance-covariance structure (hence a known density function) that I would like to compare in order to get an intersect that tells me something about "how different" these distributions are (as t-statistics for univariate distributions). In order to visualize what I mean hear a little
2010 Feb 20
1
Add lines (contours) to lattice wireframe plot
Hi, I draw a surface corresponding to bivariate density of independent variables (rho=0) using persp(). Then I add a contour line (i.e., circle in my case) at a particular density. Below is a minimal example of what I have so far. # Bivariate density dnorm2d <- function(x, y, rho = 0) { xoy = (x^2 - 2 * rho * x * y + y^2)/(2 * (1 - rho^2)) density = exp(-xoy)/(2 * pi * sqrt(1 - rho^2))
2011 Dec 22
1
overlaid filled contour plots
I'm trying to make a set of contour plots of bivariate kernel density estimates, showing three such plots overlaid, similar to this plot http://euclid.psych.yorku.ca/SCS/Private/Test/ridge-boot2.pdf except that I would like to have the contours *filled* (using transparent colors). To make this reproducible, I've saved the results of KernSmooth::bkde2D() in the following file:
2003 Jul 12
2
help with bivariate density plot question
Dear R users: I have a dataset with two variables (>20000 observations, two samples from same subject) and I used "kernSur" from library(Genkern) to get a estimated bivariate density and corresponding plots as follows: new.data.normal<-data.normal[!is.na(data.normal[,2]),] x<-new.data.normal[,2] y<-new.data.normal[,3] op <- KernSur(x,y, xgridsize=50, ygridsize=50,
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
My understanding is that this represents bivariate normal approximation of the data which uses the kernel density function to test for inclusion within a level set. (please correct me) In order to exclude the outlier to these ellipses/contours is it advisable to do something like this: SNP$density <- get_density(SNP$mean, SNP$var) > summary(SNP$density) Min. 1st Qu. Median Mean 3rd
2008 Oct 04
3
How to plot countours with fixted densities?
Hello, I used the following codes to generate bivariate normal dependence structure with unit Frechet margins. Sigma <- matrix(c(1,.5*sqrt(1),.5*sqrt(1),1),2,2) # generate y <- mvrnorm(Nsam, c(0,0), Sigma) # random v <- cbind(pnorm(y[,1],mean = 0, sd = 1), pnorm(y[,2],mean = 0, sd = 1)) z <- cbind(-1/log(v[,1]),-1/log(v[,2])) z1 <- z[,1] z2 <- z[,2] And to
2003 Aug 30
1
3D plot of a bivariate normal distribution
Hi, I've used the Mathematica to produce 3D graphics, contour plots of a bivariate normal distribution Now I want make these graphics in R, but i do not know how. I would like to: - Plot a 3D graph for some different variance matrix - Plot the contour plots - Find and try to plot (in the 3d graph ou contour plot) the (1-a)% confidence region based in a chi-square(a) with the degrees of
2005 Jul 26
1
Wishart Density
Dear R users, I am doing MCMC using Metropolis-Hastings. My model is bivariate-log-normal and the prior for variance-covariance is wishart distribution. I am wondering if there are some simple codes about how to get the density of Wishart distribution in my case ? Thanks in advance. Meihua [[alternative HTML version deleted]]
2006 Jun 24
1
Overlaying 2D kernel density plots on scatterplot matrix
Hi all We are pretty new to R here and trying to achieve something that we believe is possible but it?s not easy to work out how to do it. We are producing scatterplot matrices for e.g. 10 variables. What we would like to do is superimpose 2D kernel density estimators on top of each plot so that we end up with a scatterplot matrix of 2D kernel density (contour) plots. The kernel density plots