Refactor marginal effects for logregr