Hello,
My query is probably very simple but I can't seem to find a way to identify the closest observations.
Let's say my data is as follows
v1
20.59417
20.63302
20.73268
20.73901
20.74116
20.80359
20.92906
20.98822
20.99093
21.20109
21.24915
21.31334
21.32321
21.3418
etc.
For each observation I would like to find the four closest observations (without including the actual observation) and create a mean from them.
Any help would be appreciated
Kind Regards,
Sam
My query is probably very simple but I can't seem to find a way to identify the closest observations.
Let's say my data is as follows
v1
20.59417
20.63302
20.73268
20.73901
20.74116
20.80359
20.92906
20.98822
20.99093
21.20109
21.24915
21.31334
21.32321
21.3418
etc.
For each observation I would like to find the four closest observations (without including the actual observation) and create a mean from them.
Any help would be appreciated
Kind Regards,
Sam
Comment