SAS/R calculate distance between two groups

Posted by user976856 on Stack Overflow See other posts from Stack Overflow or by user976856
Published on 2011-11-30T17:14:32Z Indexed on 2011/11/30 17:51 UTC
Read the original article Hit count: 203

Filed under:
|
|

I would like to calculate distance between two groups. I am very confused.

I have a two data sets. One is about a company and one is about employees.

I would like to find out how their age( a company in which an employee is hired and an employee) are similar or not. I think I need to standarize also..

  1. calcuate euclidean distance between each person and a company. (4-5 people in a company)
  2. calculate euclidean distance between each person and a company in industry level.

My dataset is like this:

person person_age    company company_age insustry              

1        50             1       5         1

2        40             1       5         1

3        30             2        1        1

4        20             2        1        1

5        25             3        8        2

Please help me. I don't mind using SAS or R. I am very confused.

© Stack Overflow or respective owner

Related posts about r

    Related posts about sas