added a bunch of code from Dietze et al 2008 allometry paper for imputing missing multivariate data