How to measure level of similarity of two data frames

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to measure level of similarity of two data frames

Lamke
Hi group,

I've been thinking of calculating euclidean distance between each column of a data frames that each consists of standardized numerical columns.  However, I don't know if there's a way of summarizing the overall distance by some kind of metrics.  If anyone know a proper way of doing so and/or a package I would greatly appreciate your suggestions.  Thanks very much!

Kel
Reply | Threaded
Open this post in threaded view
|

Re: How to measure level of similarity of two data frames

Özgür Asar
Hi,

You can try

rdist function under the package fields, or

dist package under stats package.

Best
Ozgur
Reply | Threaded
Open this post in threaded view
|

Re: How to measure level of similarity of two data frames

Lamke
Thanks Ozgur.  I will definitely try them out.

Cheers,
Kel
Reply | Threaded
Open this post in threaded view
|

Re: How to measure level of similarity of two data frames

Meyners, Michael
In reply to this post by Lamke
Kel,
in addition, and depending on how you define "similarity", you might want to look into the RV coefficient as a measure of it (it is actually related to a correlation, so similarity would rather mean "similar information" though not necessarily small Euclidean distance); coeffRV in FactoMineR would be one option to determine it.
HTH, Michael

> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of Lamke
> Sent: Samstag, 26. Mai 2012 20:05
> To: [hidden email]
> Subject: [R] How to measure level of similarity of two data frames
>
> Hi group,
>
> I've been thinking of calculating euclidean distance between each
> column of a data frames that each consists of standardized numerical
> columns.
> However, I don't know if there's a way of summarizing the overall
> distance by some kind of metrics.  If anyone know a proper way of doing
> so and/or a package I would greatly appreciate your suggestions.
> Thanks very much!
>
> Kel
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-
> measure-level-of-similarity-of-two-data-frames-tp4631466.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.