Lecture 2-Modified

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Gretl code:

ols deny 0 pi_rat black


ols deny const pi_rat black –robust
gnuplot deny pi_rat #scatter plot
Gretl code: Important: The dependent variable must be binary of {0,1}
Model → Limited Dependent Variable → Probit → Binary
Model → Limited Dependent Variable → Logit → Binary
*Options:
Show slopes at mean: a column of the marginal effects (not the coefficients!)
Show p-values ( -- p-values) : to show statistical significance
-- robust : robust standard errors (as in ols)
Estimated coefficients & Marginal Effects (slopes)

Codes:
logit deny const pi_rat black
probit deny const pi_rat black
series deny_hat = $yhat #we use “series” to create a vector
How matrix of the estimates may look like
Data Matrix [X]: ‘Display values’ of selected
variables

Obs

Matrix of x0 ➔ artificially make all observations


x=0 (e.g. new_black = 0)

Matrix of x1 ➔ artificially make all observations


x1=1 (e.g. new_black = 1)

Estimated coefficient ‘Beta’ Matrix:


[B_pirat, B_black] = [value1, value2] which are the same for all observations

Estimated error term Matrix:


[Error] = [value_i] as a column vector, which are different for each observation i.
Calculating marginal effects when a discrete change of x
Calculating marginal effects when a continuous change of 𝒙𝒋
Gretl code:
#First, create a new dummy variable
genr work = (weeksm1 ==0)
# Or.
series work = (weeksm1 ==0)

You might also like