replaced calc_estimates.matrix with more elegant version without error when calculating percent relative error