If we have a model like this: $$\hat {Prob}(Y=1|X) = F(\hat \beta_0 + \hat \beta_1 age + \hat \beta_2 education + \hat \beta_3 salary)$$ (suppose education is a scalar variable here) where $F$ is a cdf of some distribution, then do we compute AVERAGE PARTIAL EFFECT of e.g. variable age by averaging the effects for every observation in the sample as: $$\frac{1}{n} \sum_{i=1}^n f(\hat \beta_0 + \hat \beta_1 age_i + \hat \beta_2 education_i + \hat \beta_3 salary_i) * \hat \beta_1 $$

($f$ is the density) or do we keep other variables (education, salary) at their means during the computation as: $$\frac{1}{n} \sum_{i=1}^n f(\hat \beta_0 + \hat \beta_1 age_i + \hat \beta_2 \overline {education} + \hat \beta_3 \overline {salary}) * \hat \beta_1 $$

$\overline {education} = \frac{1}{n} \sum_{i=1}^n education_i$ and the same for salary.

Which one of the two is used when computing Average partial effects?

  • $\begingroup$ There are In my experience the second version is quite uncommon (assuming that $age_i$ should not be replaced with $\overline{age}$). Replacing $age_i$ with $\overline{age}$ in the second expression would be something like "partial effect at the mean". $\endgroup$
    – Elias
    Dec 14, 2019 at 19:21
  • $\begingroup$ Yes, if you replace $age_i$ with $\overline {age}$, it is the marginal effect at mean of variables. But I am not interested in this one, I am interested in what is referred to as "average partial effects". $\endgroup$
    – doremi
    Dec 14, 2019 at 21:54

1 Answer 1


It is the first one. In general, the average partial effect of a continuous variable $x_k$ is $$\frac{\beta_k}{n}\sum_{i=1}^nf(\textbf{x}_i\beta),$$ where $\textbf{x}_i$ is the observed vector of explanatory variables corresponding to observation $i$. To estimate the average partial effect of $x_k$ you can thus compute $$\frac{\hat\beta_k}{n}\sum_{i=1}^nf(\textbf{x}_i\hat\beta).$$ Thus, since $age$ is continuous, it is the first expression you need to compute.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.