Euclidean distance

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

papel
Posts: 7
Joined: Fri Sep 26, 2008 7:50 am

Euclidean distance

Postby papel » Tue Jun 14, 2022 5:44 am

Hi to all,
I have a panel dataset with id and timeid and I would like to calculate the Euclidean distance in two variables.
Specifically, in each month I rank all firms on variable X and on variable Y, and I would like to find the minimum Euclidean distance in X and Y rank space, where the distance between firms i and j equals to (rankXi-rankXj)^2+(rankYi-rankYj)^2
Thank you in advance.

Return to “Programming”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests