Dear Dennis, thanks a lot for your response.
I have two time series and need to approximate there joint density.
The only thing I cannot find out is how to find the values of this function
in the points not from the resulting grid matrix
Thanks a lot
You're using a function that provides an estimate of a
*continuous*> bivariate density
> to approximate a bivariate discrete distribution? If your joint
> distribution is discrete, there are
> better ways to visualize it, and I'll leave it up to you to discover
how.
> (Hint: look at the 3D
> graphics packages.)
>
> DM
>
> On Wed, Dec 2, 2009 at 2:14 AM, Trafim <rdapamoga@gmail.com> wrote:
>
>> Dear all,
>>
>> Please, look at the following code:
>>
>> attach(geyser)
>> f1 <- kde2d(duration, waiting, n = 5)
>>
>> a <- 0
>> for (i in 1:5){
>> for (j in 1:5){
>> a <- a + f1$z[i,j]
>> }
>> }
>>
>> As far as I understood from Help kde2d returns matrix elements of which
>> are
>> values of joint probability mass function Pr(X=x,Y=y) therefore, sum of
>> its
>> elements should sum to 1.
>> Which is not the case from my check.
>> Where is the problem here?
>>
>> Thanks a lot.
>>
>> [[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.
>>
>
>
[[alternative HTML version deleted]]