Re: [R] Density estimation and plots

2011-04-13 Thread Jim Silverton
I have two columns of data, one is a subset of the other. All the data lie beteen 0 and 1 inclusive. I want to fit both densities on the same graph. I would also like the ability to extract the fitted values of both smoothed density (using the best method of course). For example, if h = c( runif(1

Re: [R] Density estimation: scale back for calendar time

2009-03-26 Thread David Winsemius
Pradeep Raje gmail.com> writes: > > Thanks David for your response.I had done that. But not shared it. > Problem is not with the > computations, but in the interpretation. > Assume that x ordinates are 'time' [1:3472], and y are associated parameter > values. > Now density gives me 512/1024/2

Re: [R] Density estimation: scale back for calendar time

2009-03-26 Thread Pradeep Raje
Thanks David for your response.I had done that. Problem is not with the computations, but in the interpretation. Assume that x ordinates are 'time' [1:3472], and y are associated parameter values. Now density gives me 512/1024/2048 x-ordinates, of which some (7 to be precise) are negative. What do

Re: [R] Density estimation: scale back for calendar time

2009-03-25 Thread David Winsemius
I am afraid your notion of a "concrete idea" is less concrete than what I would need to understand what you are requesting. Your first lines of example code should be: library() density(x, ) ... since stats::density() by default would return 512 y estimates, even if the length of x we

[R] Density estimation: scale back for calendar time

2009-03-25 Thread Pradeep Raje
Dear all:Request your indulgence. The econophysics gurus do this stuff all the time: all their PDFs are smooth, with neat log x axis. 1. The kernel density estimate (KDE) function returns the empirical probability density at 2^n points (min: 512). The big question is how do I scale back the x-value

[R] density estimation for d>2 for the DPpackage

2009-02-22 Thread rodrigo herrera
Dear List, I am trying to estimate a 3 dimensional density through the DPpackage. For example # model sigma <- matrix(c(0.1,0.05,0.05,0.05,0.1,0.05,0.05,0.05,0.1), ncol=3) rnormm<- rmvnorm(n=100, mean=c(5,100,150), sigma=sigma) sigma2 <- matrix(c(10,0.05,0.05,0.05,10,0.05,0.05,0.05,10), ncol=3)

Re: [R] Density estimation

2008-04-23 Thread Greg Snow
) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gunther Jansen > Sent: Wednesday, April 23, 2008 4:59 AM > To: r-help@r-project.org > Subject: [R] Density estimation > > Hi, > > I am analysing a datase

[R] Density estimation

2008-04-23 Thread Gunther Jansen
Hi, I am analysing a dataset containing genetic distances within and between species. I want to show a overlap of the distributions of the intra- and interspecific values; on a second graph I use a cut-off value to determine these boundaries. As the dataset contains >30 000 values, I would like