Re: [R] How to calculate the distance between two density functions

2008-12-06 Thread Rainer M Krug
On Fri, Dec 5, 2008 at 3:59 PM, Chang Jia-Ming <[EMAIL PROTECTED]> wrote: > Dear all, > > I wrote the following code to calculate the density functions for two data > sets, respectively. > > den_str <-density(str_data$Similarity); > den_non_str <-density(nonstr_data$Similarity); > > However, I

Re: [R] How to calculate the distance between two density functions

2008-12-05 Thread Lucke, Joseph F
, December 05, 2008 8:00 AM To: r-help@r-project.org Subject: [R] How to calculate the distance between two density functions Dear all, I wrote the following code to calculate the density functions for two data sets, respectively. den_str <-density(str_data$Similarity); den_non_str <-d

Re: [R] How to calculate the distance between two density functions

2008-12-05 Thread David Winsemius
A similar question was posed and answered: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/119793.html Two aspects needed to be addressed ... specifying the same domain, and getting the x-values to "line up" prior to the subtraction (or whatever function is desired). What are you going to

[R] How to calculate the distance between two density functions

2008-12-05 Thread Chang Jia-Ming
Dear all, I wrote the following code to calculate the density functions for two data sets, respectively. den_str <-density(str_data$Similarity); den_non_str <-density(nonstr_data$Similarity); However, I would like to knowing the difference between den_str and den_non_str, that is, the di