Quantifying resilience in sows and wean-to-finish pigs