Re: [R] truehist and density plots

2009-04-29 Thread Jim Lemon
carol white wrote: 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 t

Re: [R] truehist and density plots

2009-04-28 Thread carol white
Is there any other way to illustrate the overlap of subsets' distribution (not necessarily by an estimation plot but by a plot of true values)? --- On Tue, 4/28/09, Uwe Ligges wrote: From: Uwe Ligges Subject: Re: [R] truehist and density plots To: wht_...@yahoo.com Cc: r-h...@stat.math.et

Re: [R] truehist and density plots

2009-04-28 Thread Peter Flom
carol white wrote >Consider a vector of 100 elements (attached files). then, > >truehist(b) >lines(density(b[20:50])) > >How is it possible to have density plots of all subsets like b[20:50] within >histogram (without exceeding the max of historgram on y axis)? > I didn't open your attached fi

Re: [R] truehist and density plots

2009-04-28 Thread Cuvelier Etienne
histogram (without exceeding the max of historgram on y axis)? Is it more clear? Best, --- On Tue, 4/28/09, Uwe Ligges wrote: From: Uwe Ligges Subject: Re: [R] truehist and density plots To: "carol white" Cc: r-h...@stat.math.ethz.ch Date: Tuesday, April 28, 2009, 5:42 AM carol w

Re: [R] truehist and density plots

2009-04-28 Thread carol white
r all subsets? thanks --- On Tue, 4/28/09, Uwe Ligges wrote: From: Uwe Ligges Subject: Re: [R] truehist and density plots To: "carol white" Cc: r-h...@stat.math.ethz.ch Date: Tuesday, April 28, 2009, 6:16 AM carol white wrote: > Consider a vector of 100 elements (attached files). t

Re: [R] truehist and density plots

2009-04-28 Thread Uwe Ligges
very small variance (which might happen), you'd get a very high estimate at the center. Uwe Ligges thanks --- On Tue, 4/28/09, Uwe Ligges wrote: From: Uwe Ligges Subject: Re: [R] truehist and density plots To: "carol white" Cc: r-h...@stat.math.ethz.ch Date: Tuesday, Apr

Re: [R] truehist and density plots

2009-04-28 Thread Uwe Ligges
: # ignore the first plot: truehist(b) yl <- par("usr")[4] d <- density(b[20:50]) truehist(b, ylim=c(0, max(yl, d$y))) lines(d) Uwe Ligges Best, --- On Tue, 4/28/09, Uwe Ligges wrote: From: Uwe Ligges Subject: Re: [R] truehist and density plots To: "

Re: [R] truehist and density plots

2009-04-28 Thread carol white
wrote: From: Uwe Ligges Subject: Re: [R] truehist and density plots To: "carol white" Cc: r-h...@stat.math.ethz.ch Date: Tuesday, April 28, 2009, 5:42 AM carol white wrote: > Hi, > I wanted to plot the histogram of a vector and then, plot the density function of subsets of t

Re: [R] truehist and density plots

2009-04-28 Thread Uwe Ligges
carol white wrote: 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])) I do not undertsand what

[R] truehist and density plots

2009-04-28 Thread carol white
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 e