<p>It appears to me that the textbook is ambiguous. It is probably either (1) or (2) which you mention. The bottom row of the table has <span class="math-container">$f(\bar{x}'\hat{\beta})$</span>, which makes me inclined to think it is the second thing you wrote.</p>
<p>EDIT: It is definitely the second. As you mention, <span class="math-container">$f(\bar{x}'\hat{\beta})\hat{\beta}$</span> are marginal effects at the average. In the table, the slope is <span class="math-container">$\hat{\beta}$</span> multiplied by <span class="math-container">$f(\bar{x}'\hat{\beta})$</span>. That's definitely what is going on.</p>

CC BY-SA 4.0
2022-07-06T15:26:18.627Z
Yes! I could not deduce that from the text.
Erwin Kalvelagen
CC BY-SA 4.0
2022-07-05T15:44:09.233Z
2022-07-06T07:18:08.280Z
2022-07-06T07:18:08.280Z
Michael Gmeiner
<p>In Greene, Econometric Analysis, the following table is shown from a probit regression:</p>
<p><a href="https://i.sstatic.net/NttXE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NttXE.png" alt="enter image description here" /></a></p>
<p>I am trying to reproduce these results. (That is my preferred way to get a better understanding of this). My question: <em>what is this <strong>slope</strong> (derivative) in Probit regression column</em>? I think it could be:</p>
<ol>
<li>The average of <span class="math-container">$$\frac{\partial f(x_i'\hat{\beta})}{\partial\hat{\beta}_j}$$</span></li>
<li>Or just <span class="math-container">$$\frac{\partial f(\bar{x}'\hat{\beta})}{\partial\hat{\beta}_j}$$</span> like the <span class="math-container">$f(\bar{x}'\hat{\beta})$</span> quantity at the bottom (Greene calls that one &quot;scale factor&quot;). I had no problems reproducing this value (0.328).</li>
<li>Or may be something else. There is something called the marginal effect, defined as  <span class="math-container">$f(x,\beta) \beta_k$</span> (don't know what <span class="math-container">$x$</span> is here, may be <span class="math-container">$\bar{x}$</span>, and whether I can interpret <span class="math-container">$\beta$</span> as <span class="math-container">$\hat{\beta}$</span>).</li>
</ol>
<p>Is there a definition for this slope quantity?</p>
<hr />
<p>My attempts so far:</p>
<pre><code>$ontext

   Probit Estimation
   -----------------
   We use OLS to get a good starting point

   Erwin Kalvelagen, Amsterdam Optimization

   Data:
      http://pages.stern.nyu.edu/~wgreene/Text/tables/TableF21-1.txt

$offtext


*-----------------------------------------------------------
* raw data from Greene
*-----------------------------------------------------------

sets
  i 'records' /1*32/
  p0 'all variables' /constant,grade,gpa,tuce,psi/
;

table data(i,p0)

       GPA      TUCE     PSI      GRADE
 1      2.66      20      0        0
 2      2.89      22      0        0
 3      3.28      24      0        0
 4      2.92      12      0        0
 5      4.00      21      0        1
 6      2.86      17      0        0
 7      2.76      17      0        0
 8      2.87      21      0        0
 9      3.03      25      0        0
10      3.92      29      0        1
11      2.63      20      0        0
12      3.32      23      0        0
13      3.57      23      0        0
14      3.26      25      0        1
15      3.53      26      0        0
16      2.74      19      0        0
17      2.75      25      0        0
18      2.83      19      0        0
19      3.12      23      1        0
20      3.16      25      1        1
21      2.06      22      1        0
22      3.62      28      1        1
23      2.89      14      1        0
24      3.51      26      1        0
25      3.54      24      1        1
26      2.83      27      1        1
27      3.39      17      1        1
28      2.67      24      1        0
29      3.65      21      1        1
30      4.00      23      1        1
31      3.10      21      1        0
32      2.39      19      1        1

;

data(i,'constant') = 1;
display data;

*-----------------------------------------------------------
* extract data
* form y, x
*-----------------------------------------------------------

set p(p0) 'independent variables' /constant,gpa,tuce,psi/;

parameters
 y(i)    'grade'
 x(i,p)  'independent variables'
;

y(i)   = data(i,'grade');
x(i,p) = data(i,p);
display x,y;


*-----------------------------------------------------------
* solve OLS as QP
*-----------------------------------------------------------

parameter estimate(p,*) 'results';

variable
  sse        'sum of squared errors'
  coeff(p)   'estimated coefficients'
  e(i)       'error term'
;
equation
  obj        'objective'
  fit(i)     'linear fit'
;

obj..    sse =e= sum(i, sqr(e(i)));
fit(i).. y(i) =e= sum(p, coeff(p)*x(i,p)) + e(i);

model ols /obj,fit/;
solve ols using qcp minimizing sse;

estimate(p,'OLS') = coeff.l(p);


*-----------------------------------------------------------
* Max log likelihood
*-----------------------------------------------------------

variable logl 'log likelihood';
equation like;

like.. logl =e= sum(i<span class="math-container">$(y(i)=1), log(errorf(sum(p,coeff(p)*x(i,p)))))
               +sum(i$</span>(y(i)=0), log(1-errorf(sum(p,coeff(p)*x(i,p)))));

model mle /like/;
solve mle using nlp maximizing logl;

estimate(p,'Probit') = coeff.l(p);

display estimate;

*-----------------------------------------------------------
* reproduce f
*-----------------------------------------------------------

parameter xbar(p) 'mean of the data';
xbar(p) = sum(i,x(i,p))/card(i);
display xbar;

scalar f 'scale factor: density evaluated at the means';
f = errorf.grad(sum(p,xbar(p)*coeff.l(p)));
display f;
</code></pre>
<hr />
<p>Conclusion: slope is the &quot;marginal effect&quot;. So: <span class="math-container">$${\mathit slope}_j = f(\bar{x}'\hat{\beta})\cdot \hat{\beta}_j$$</span></p>
<pre><code>parameter slope(p) 'marginal effect';
slope(p)$(not sameas(p,'constant')) = f*coeff.l(p);
display slope;
</code></pre>
<p>This was an interesting exercise.</p>

<econometrics><textbooks>
Slope in Probit results
Erwin Kalvelagen
# Slope in Probit results

(Asked by: username_0 on 2022-07-03)

In Greene, Econometric Analysis, the following table is shown from a probit regression:

[![enter image description here](https://i.sstatic.net/NttXE.png)](https://i.sstatic.net/NttXE.png)

I am trying to reproduce these results. (That is my preferred way to get a better understanding of this). My question: *what is this **slope** (derivative) in Probit regression column*? I think it could be:

1. The average of $$\frac{\partial f(x\_i'\hat{\beta})}{\partial\hat{\beta}\_j}$$
2. Or just $$\frac{\partial f(\bar{x}'\hat{\beta})}{\partial\hat{\beta}\_j}$$ like the $f(\bar{x}'\hat{\beta})$ quantity at the bottom (Greene calls that one "scale factor"). I had no problems reproducing this value (0.328).
3. Or may be something else. There is something called the marginal effect, defined as $f(x,\beta) \beta\_k$ (don't know what $x$ is here, may be $\bar{x}$, and whether I can interpret $\beta$ as $\hat{\beta}$).

Is there a definition for this slope quantity?

---

My attempts so far:

```
$ontext

   Probit Estimation
   -----------------
   We use OLS to get a good starting point

   username_0 username_0, Amsterdam Optimization

   Data:
      http://pages.stern.nyu.edu/~wgreene/Text/tables/TableF21-1.txt

$offtext

*-----------------------------------------------------------
* raw data from Greene
*-----------------------------------------------------------

sets
  i 'records' /1*32/
  p0 'all variables' /constant,grade,gpa,tuce,psi/
;

table data(i,p0)

       GPA      TUCE     PSI      GRADE
 1      2.66      20      0        0
 2      2.89      22      0        0
 3      3.28      24      0        0
 4      2.92      12      0        0
 5      4.00      21      0        1
 6      2.86      17      0        0
 7      2.76      17      0        0
 8      2.87      21      0        0
 9      3.03      25      0        0
10      3.92      29      0        1
11      2.63      20      0        0
12      3.32      23      0        0
13      3.57      23      0        0
14      3.26      25      0        1
15      3.53      26      0        0
16      2.74      19      0        0
17      2.75      25      0        0
18      2.83      19      0        0
19      3.12      23      1        0
20      3.16      25      1        1
21      2.06      22      1        0
22      3.62      28      1        1
23      2.89      14      1        0
24      3.51      26      1        0
25      3.54      24      1        1
26      2.83      27      1        1
27      3.39      17      1        1
28      2.67      24      1        0
29      3.65      21      1        1
30      4.00      23      1        1
31      3.10      21      1        0
32      2.39      19      1        1

;

data(i,'constant') = 1;
display data;

*-----------------------------------------------------------
* extract data
* form y, x
*-----------------------------------------------------------

set p(p0) 'independent variables' /constant,gpa,tuce,psi/;

parameters
 y(i)    'grade'
 x(i,p)  'independent variables'
;

y(i)   = data(i,'grade');
x(i,p) = data(i,p);
display x,y;

*-----------------------------------------------------------
* solve OLS as QP
*-----------------------------------------------------------

parameter estimate(p,*) 'results';

variable
  sse        'sum of squared errors'
  coeff(p)   'estimated coefficients'
  e(i)       'error term'
;
equation
  obj        'objective'
  fit(i)     'linear fit'
;

obj..    sse =e= sum(i, sqr(e(i)));
fit(i).. y(i) =e= sum(p, coeff(p)*x(i,p)) + e(i);

model ols /obj,fit/;
solve ols using qcp minimizing sse;

estimate(p,'OLS') = coeff.l(p);

*-----------------------------------------------------------
* Max log likelihood
*-----------------------------------------------------------

variable logl 'log likelihood';
equation like;

like.. logl =e= sum(i$(y(i)=1), log(errorf(sum(p,coeff(p)*x(i,p)))))
               +sum(i$(y(i)=0), log(1-errorf(sum(p,coeff(p)*x(i,p)))));

model mle /like/;
solve mle using nlp maximizing logl;

estimate(p,'Probit') = coeff.l(p);

display estimate;

*-----------------------------------------------------------
* reproduce f
*-----------------------------------------------------------

parameter xbar(p) 'mean of the data';
xbar(p) = sum(i,x(i,p))/card(i);
display xbar;

scalar f 'scale factor: density evaluated at the means';
f = errorf.grad(sum(p,xbar(p)*coeff.l(p)));
display f;

```

---

Conclusion: slope is the "marginal effect". So: $${\mathit slope}\_j = f(\bar{x}'\hat{\beta})\cdot \hat{\beta}\_j$$

```
parameter slope(p) 'marginal effect';
slope(p)$(not sameas(p,'constant')) = f*coeff.l(p);
display slope;

```

This was an interesting exercise.

**Tags:** econometrics, textbooks


---

## 1 answers

### Answer by username_1 on 2022-07-05. Score: 2 | Accepted answer

It appears to me that the textbook is ambiguous. It is probably either (1) or (2) which you mention. The bottom row of the table has $f(\bar{x}'\hat{\beta})$, which makes me inclined to think it is the second thing you wrote.

EDIT: It is definitely the second. As you mention, $f(\bar{x}'\hat{\beta})\hat{\beta}$ are marginal effects at the average. In the table, the slope is $\hat{\beta}$ multiplied by $f(\bar{x}'\hat{\beta})$. That's definitely what is going on.

> **Comments:**
> **username_0**: Yes! I could not deduce that from the text.  

---

