similar to: Question about histogram

Displaying 20 results from an estimated 20000 matches similar to: "Question about histogram"

2012 Mar 12
3
A question on histogram - area much less than 1
Hello, I have problem running the histogram function "hist". The area under the histogram is much lower than 1. Could anyone tell me what the problem is? Thanks, (The total number of observation is 992 (close to 1000), so the probability that 0<Y1<35 is approximately 0.277) miao rm(list=ls()) par(mfrow=c(1, 1)) Y <- cbind(matrix(35*0.5,1,277), matrix(35*1.5, 1, 146),
2009 May 09
2
Histogram frequencies with a normal pdf curve overlay
Dear List, When I plot a histogram with 'freq=FALSE' and overlay the histogram with a normal pdf curve, everything looks as expected, as follows: x <- rnorm(1000) hist(x, freq=FALSE) curve(dnorm(x), add=TRUE, col="blue") What do I need to do if I want to show the frequencies (freq=TRUE) with the same normal pdf overlay, so that the plot would still look the same? Regards,
2009 Apr 22
1
converting histogram to barchart
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below binweigh=0.1. The trouble with the current graph is that it is not very clear since the density plot
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
2011 Jun 09
1
histogram - density on y axis and restriction to interval [0, 1]
Hello, To indicate probability densities instead of counts on a histogram, I specify freq = FALSE. However, I expect that summing all top y coordinates over all the intervals of the histogram will provide 1. 1) v <- c(0.2885, 0.2988, 0.3139, 0.2615, 0.3179, 0.3163, 0.2583, 0.3052, 0.2527, 0.3147, 0.3235, 0.2408, 0.2480, 0.3108, 0.3577, 0.2829, 0.2694, 0.3275, 0.3314, 0.2639, 0.3076,
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi, I am facing the problem that I want to plot a histogram chart set freq to true and overlay with normal or weibull or exponential distribution curve. The sample code is shown as below: >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321, -8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
2006 Aug 10
3
Multiple density curves
Hi, I am new to R...a recent convert from SAS. I have a dataset that looks like this: SEQ A1 A2 A 532.5 554.5 B 25.5 35.5 C 265.2 522.2 D 245.55 521.56 E 546.52 141.52 F 243.25 32.56 G 452.55 635.56 H 15.14 16.54 I 543.4 646.56 J 54.4 654.5 K 646.5 64.54 L 645.4 614.46 M 646.54 634.46 I want to make a histogram
2008 Aug 07
2
histogram - freq=FALSE - density computation
Hi, I don't understand what hist(x, freq=FALSE) does. At first I thought it would be just the relative frequencies instead of the absolute frequencies, by just computing "frequencies / n" in every category. But with a small dataset the y-values (densities) don't sum to one. Is there a way to get the histogram doing that? Or what is the idea of this density-computation?
2003 Mar 08
2
hist() basic question
Hi, This is a very basic question, but I would like to undestand hist(). I thought that the hist( , freq=FALSE) should provide the relative frequencies (probabilities), and so they should sum 1, however: set.seed(2) ah <- hist(rnorm(100), freq=F) sum(ah$intensities) [1] 2 set.seed(2) bh <- hist(rlnorm(100), freq=F) sum(bh$intensities) [1] 0.4999996 I'm getting similar figures with
2006 Apr 05
1
hist function: freq=FALSE for standardised histograms
Dear All, I am a undergraduate using R for the first time. It seems like an excellent program and one that I look forward to using a lot over the next few years, but I have hit a very basic problem that I can't solve. I want to produce a standardised histogram, i.e. one where the area under the graph is equal to 1. I look at the manual for the histogram function and find this: freq:
2011 Jul 15
3
Drawing a histogram from a massive dataset
Dear All, I have a massive dataset from which I would like to draw a histogram. Any ideas on how to accomplish this? Thanks in advance, Paul
2008 Sep 14
2
histogram
i calculated the density and wanna do something like this separate in 0-19-29-39-49-59-69-79-99 and put in these spaces 8 densities .. 0.something i have the frequency in % and divided already in 20 or 10 to get the density i tried and tried..made breaks vector to separate but couldn't put the other vector with the frequency density onit directly anyone know how to do it?? tks
2004 May 25
5
Histogram
Dear all, I have a surprising problem with the representation of frequencies in a histogram. Consider, for example, the R code: b<-rnorm(2000,3.5,0.3) hist(b,freq=F) When I plotted the histogram, I expected that values in the y-axis (the probability) varied between 0 and 1. Instead, they varied within the range 0-1.3. Have you got any suggestion for obtaining a correct graph with
2005 Jun 01
3
histogramm?
Hello there! When I do freq=F on hist, I get on the left a small number, what exactly does that mean? Thanks, Martin
2004 Nov 26
2
hist and truehist
Hello! Up to now I have been using hist() to display the distributions. Howevere, I noteiced strange numbers on y (vertical) axis, if I used probability = T or freq = F option. I thought it is a bug and launched the R-bug system and found some posts on that matter. Brian Ripley responded to one, that one should look at truehist() for that. Ok I can use truehist() if I want to see the ratios
2004 Aug 19
3
probability histogram question
Hello, all; I get an unexpected result when trying to plot a probability histogram with R1.9.1 on windows xp: #with the following code: > x <- runif(100,0,1) > hist(x) > hist(x, freq=F) > h <- hist(x, freq=F) > summary(h) # Length Class Mode #breaks 11 -none- numeric #counts 10 -none- numeric #intensities 10 -none- numeric #density 10
2010 Apr 07
1
help in histogram
x<- sample(1:14, 319, rep=T) hist(x, freq=F, xlab='',ylab="Percent of Total", col="skyblue", labels=TRUE, right=FALSE,main="Position of Hypothetical Protein") Is there is way to round the labels to 2 decimal digits, for example, 0.088 is changed to 0.09. Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2009 Mar 02
4
density > 1?
Dear R-Gurus, I wonder why 'density' values as shown in hist or plot(density(x)) are sometimes over 1. How can that be? Example >hist(rnorm(1000,sd=.5),freq=FALSE) The resulting plot shows density values below 1 on the y-axis. However, >hist(rnorm(1000,sd=.1),freq=FALSE) shows density values over 1. How to interpret density values over 1? Greetings, Johannes
2007 Mar 08
2
Using logarithmic y-axis (density) in a histogram
Hi, I am searching for a possibility to display a logarithimic y-axis in a histogram. With plot that's easy (e.g. plot(1:10, log="y") but for histograms this does not work the same way: I tried hist(rnorm(1000), freq=FALSE, seq(-4, 4, .5), ylim=c(0.001, 0.5), log="y") Which gives the expected histogram but also warnings for my log="y" command
2006 Sep 15
2
Histogram of data with categorical varialbe
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible Url : https://stat.ethz.ch/pipermail/r-help/attachments/20060915/8b4027b0/attachment.pl