This takes a numeric matrix, bootstrap resamples each row, and then
calculates the mean. The intended use case is for Bayesian posterior
predictions from sample data. Instead of directly calculating the
average marginal effect (AME) across all observed values, these can be
bootstrapped, so that uncertainty in the target population, and thus
the AME in the target population, can be incorporated.
Model uncertainty is already assumed to be handled by the different posterior
samples, which are assumed to be across rows.