add function to compute robustness; track robustness and path length at individual level