Selectivity is the same as Jensen's alpha
Selectivity(Ra, Rb, Rf = 0, ...)$$Selectivity = r_p - r_f - \beta_p * (b - r_f)$$
where \(r_f\) is the risk free rate, \(\beta_r\) is the regression beta, \(r_p\) is the portfolio return and b is the benchmark return
Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.78
data(portfolio_bacon)
print(Selectivity(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -0.0141
#> [1] -0.01416944
data(managers)
print(Selectivity(managers['2002',1], managers['2002',8]))
#> [1] 0.03780793
print(Selectivity(managers['2002',1:5], managers['2002',8]))
#> HAM1 HAM2 HAM3 HAM4
#> Jensen's Alpha (Risk free = 0) 0.03780793 -0.1015863 -0.09419238 0.09430126
#> HAM5
#> Jensen's Alpha (Risk free = 0) -0.08667631