Dear Sir or Madam,

I am trying to detect influencial cases using the "cook" approach with regress. It works fine when I look for influencial cases that have a negative impact on the coefficient, but I am finding it hard when it comes to detecting the ones that have a positive impact:

Here is the code I am running:

regress Y a b c f e i.YEAR if (ID!=24344)


list ID e cook if cook>4/74
dfbeta
sort _dfbeta_2
list ID _dfbeta_2 in -4/1

The message that appears is "observation numbers out of range"

Could somebody help me?

Thank you.

Best,
Joao