Construction and analysis of matrix population models