similar to: what "density" is plotting ?

Displaying 20 results from an estimated 40000 matches similar to: "what "density" is plotting ?"

2010 Sep 21
5
Combined plot: Scatter + density plot
Hi, in order to save space for a publication, it would be nice to have a combined scatter and density plot similar to what is shows on http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78 I wonder if anybody perhaps has already developed code for this and is willing to share. This is the reproducible code for the histogram version obtained from the site: def.par <-
2010 Jun 26
4
integration of two normal density
Hello everyone, I have a question about integration of two density function Intuitively, I think the value after integration should be 1, but they are not. Am I missing something here ? > t=function(y){dnorm(y, mean=3)*dnorm(y/2, mean=1.5)} > integrate(t, -Inf, Inf) 0.3568248 with absolute error < 4.9e-06 Also, is there any R function or package could do multivariate integration ?
2003 Apr 09
3
plotting the lognormal density curve
I am trying to plot a lognormal density curve on top of an existing histogram. Can anybody suggest a simple way to do this? Even if someone could just explain how to plot a regular normal density curve on top of an existing histogram, it would be a big help. Also, is there some way to search through the R-help archives other than simple browsing? Thank you so much. Your help and time is greatly
2010 Jun 23
3
integrate dmvtnorm
Hello, everyone, I have a question about integration of product of two densities. Here is the sample code; however the mean of first density is a function of another random variable, which is to be integrated. ## f=function(x) {dmvnorm(c(0.6, 0.8), mean=c(0.75, 0.75/x))*dnorm(x, mean=0.6, sd=0.15)} integrate(f, lower=-Inf, upper=Inf) ## error message Error in dmvnorm(c(0.6, 0.8), mean = c(0.75,
2011 Jun 07
1
ggplot2 Histogram with density curve
I am learning ggplot2 commands and I have figured out how to create histograms and density curves but I am not sure how to add a density curve on top of a histogram. Here are the two graphs that I created. ## Histogram t<-rnorm(500) w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colour=I("black"), geom="histogram") w ##Density Curve
2011 Jul 14
2
Add a density line to a cumulative histogram - second try
Hi list, this is my second try for first post on this list (I tried to post via email and nothing appeared in my email-inbox, so now I try to use the nabble-web-interface) - I hope that you will only have to read one post in your inbox! Okay, my question ... I was able to plot a histogram and add the density()-line to this plot. I was able to plot a cumulative form of this histogram. Yet, I was
2010 Nov 10
1
plotting histograms/density plots in a triangular layout?
Hi! I have a set of 49 pairwise comparisons that I have done. From this I would like to plot either histograms or the density plots of the values I get. Now, I can plot one histogram per comparison, but I have problems getting the output I want. When plotting like I normally would do: histogram(~percid | orgA_orgB, data = alldata) I get the histograms next to eachother in a boxlike shape.
2011 May 24
1
histogram with density
Hello All,* *I want to draw a histogram with density curve. * *For that simply i created a data called*"x" *and i used the function called * hist(x, col = "blue", freq = FALSE),** *from this function i got a histogram*. *After that , i tried this function* ** lines(density(x), col = "red", lwd = 2 ) *but i could not get the density curve. So, Again i used
2011 Aug 02
1
Need to compute density as done by panel.histogram
Hi, This might be a simple problem but I don't know how to calculate a random variable density the way panel.histogram does it before it creates the actual density rectangles. The documentation says that it uses the density function but the actual code suggests that the hist.constructor function (which does not seem to be easily accessible). Any suggestion for computing the density values of
2009 Apr 28
3
truehist and density plots
Hi, I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows: length(b) = 1000 truehist(b) lines(density(b[1:100])) however the density plot of the first 100 points exceeds the max of y axis (see attached). how is it possible to make a graphics so that the density plot
2009 Aug 19
1
Fw: Hist & kernel density estimates
For the hist estimate >par(mex=1.3) >dens<-density(q) >options(scipen=4) > ylim<-range(dens$y) > h<-hist(q,breaks="scott",freq=FALSE,probability=TRUE, +? right=FALSE,xlim=c(9000,16000),ylim=ylim,main="Histogram of q(scott)") > lines(dens) >box() ? For the kernel estimate>options(scipen=4) > d <- density(q, bw =
2013 Jan 22
3
density of hist(freq = FALSE) inversely affected by data magnitude
Hi, I have a couple of observations, a question or two, and perhaps a suggestion related to the plotting of density on the y-axis within the hist() function when freq=FALSE. I was using the function and trying to develop an intuitive understanding of what the density is telling me. After reading through this fairly helpful post:
2008 Dec 26
1
histogramm$density
hello, i am using the hist function with classified values. The class breaks are >1, so histogram$density is != 1. How to plot the histogram with freq=FALSE and the real class density values. I used: > h2 = hist(value, breaks = breaks_vector) > h2$density = round(h2$counts/sum(h2$counts), 2) > h2$intensities = h2$density > plot(h2, freq=F) but this isn't the best way, i
2000 Nov 17
2
hist() and density
There were some questions about hist() a couple of days ago which triggered this post. My question/suggestion is about the y-axis in hist. There are reasons to prefer making the y-axis density=relative frequency/bin width. One reason is that the height of the plot does not depend on the bin width; another is that if your histogram is in density then you can easily superimpose a smooth theoretical
2004 Jun 17
3
disappointed with x-axes in hist and density plots
I've got a few issues with the x-axes in the histogram and density plots. First, often the default x-axis doesn't even extend to the length of my data. R often draws histogram bars (or density lines) farther than the drawn x-axis extends. For example, I might have a histogram bar at -15,000. But I wouldn't know that, because the most negative number on the x-axis is -10,000. The
2005 Apr 27
4
Density curve over a histogram
Dear All I would like to draw a picture with the density curve of a normal distribution over a histogram of a set of random numbers extracted from the same normal distribution. Is that possible? Thanks in advance, Paul
2009 Dec 09
3
Plotting frequency curve over histogram
Hello, This is a problem for which there seem to be several solutions online, but not really. My question was about plotting a curve over the histogram. All the previous posts and messages talk about generating a *density histogram*using (freq=F) and then plotting the density curve. However, I find that that seriously distorts my data and the plot becomes confounding to the viewer. I was
2009 Aug 19
1
Hist & kernel density estimates
Dear All, Attached are the codes of a histogram & a kernel density estimate and the output they produced. In fact the variable q is a vector of 1000 simulated values; that is I generated 1000 samples from the pareto distribution, from each sample I calculated the value of q ( a certain fn in the sample observations), and thus I was left with 1000 values of q and I don't know the
2002 Oct 16
1
how to overlay the histogram with fitted gamma density plot (emergent!!)
For a real data column X value ranged between (56.4521,32317.9) with missing values, I need to overlay 2 plots: histogram & fitted gamma density. I use following to generate histogram. xbk_seq(50,33000,by=100) hist(x,breaks=xbk) But I don't know how to get "fitted gamma density"? In SAS proc capability, I got Shape=2.59, Scale=3481). But when I do plot(dgamma(x,
2010 Feb 25
5
Plotting 15 million points
Hi All I have a vector of about 15 million numbers which I would like to plot. The goal is the see the distribution. I tired the usual steps. 1. Histogram : never gets complete my window freezes w/out log base 10 2. Density : I first calculated the kernel density and then plotted it which worked. It would be nice to superimpose histogram with density but as of now I am not able to get this