Hi,

I have data for almost 7,000 organisations.

I want to use say, 6 variables, to identify the 60 most 'similar' organisations, for each of the 7,000 organisations.

So each organisation is assigned 60 nearest neighbors.

is there a way to do this outside of teffects?

Or is the 'best' way to use teffects in a loop where I have 1 treatment observation, and 6999 'controls'. With the neighbors identified one by one?

This would probably require a lot of computer time. However, I could speed it up by breaking the job up and running in parallel.

Regards,

Andrew