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 I make of the non-zero probability at
**negative** times?

If you see your rnorm case, you get the first few items negative. If the x
items are bounded non-negative, what would density estimates at negative
x-points mean?

I can't do a linear scaling because that will disturb the density estimates
on different days.
Regards,
pradeep

On Wed, Mar 25, 2009 at 11:39 PM, David Winsemius <dwinsemius@comcast.net>wrote:

> 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(<if the density function is not from stats>)
>   <sample data construction of x>
> density(x, <some set of parameters>)
>
> ... since  stats::density() by default would return 512 y estimates, even
> if the length of x were longer.
>
> > x <- rnorm(3471)
> > plot(density(x))
> > str(density(x))
> List of 7
>  $ x        : num [1:512] -3.98 -3.96 -3.94 -3.93 -3.91 ...
>  $ y        : num [1:512] 7.98e-06
>
> --
> David Winsemius
>
>
> On Mar 25, 2009, at 9:30 AM, Pradeep Raje wrote:
>
>  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-values (say, density$x) to x-values in terms of the
>> original dataset?
>> 2. To give you a concrete idea, i have a dataset of 3471 obs (x=date
>> index,
>> y=parameter values). Now the density estimate d<-density(x) gives be 2048
>> x-values. When I plot the PDF, the x axis is obviously d$x, length=2048.
>> 3. How can I scale back these 2048 values to get a sense of calendar time
>> (original date index)?
>> 4. Subsidiary question is: how do i bring in the remaining values
>> (3471-2048)?
>>
>
> You seem to have the idea that the original data is "lined up" with the
> density estimates. That is not so.
>
>
>> Thanks very much in advance.
>> pradeep
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>

	[[alternative HTML version deleted]]


