microeconometric /* This sample SAS program uses the Mroz data to examine whether the age and number of children affects the wage of married w

microeconometric

/* This sample SAS program uses the Mroz data to examine whether the age and
number of children affects the wage of married working women. */

Don't use plagiarized sources. Get Your Custom Assignment on
microeconometric /* This sample SAS program uses the Mroz data to examine whether the age and number of children affects the wage of married w
From as Little as $13/Page

/* A ‘comment’ is any line in your code that is ignored by the compiler. Note
that we use ‘/’ followed by ‘*’ to begin a comment in our SAS code; we
use a ‘*’ followed by a ‘/’ to end the comment. If you want to run a section
of code, you can comment out any portion of your code that you do NOT want
compiled. */

/* Generally speaking, the SAS programming language relies on two mechanisms:
‘data steps’ that are used to read in, manipulate, and merge datasets; and
canned ‘procedures’ that are used to perform specific tasks like sorting
data, printing results, calculating means, and performing estimation. When
used for econometrics, a typical SAS program will consist of three parts:
one or more data steps to read in raw data and create the dataset that will
be used for analysis; then one or more procedures that perform the analysis;
and finally one or more data steps that convert the output from the
procedures into a useful table. */

/* A SAS program is identified using a .sas suffix (hence the name of this
file). When you execute a SAS program, it will create a LOG file and a
RESULTS file. The LOG file provides step-by-step comments about the
compiling of your program. You always want to check the LOG file for any
comments that suggest a programming error. The RESULTS file will include all
of the any output that is requested (using the PRINT procedure) or
automatically generated from the procedure (like a table of regression
coefficients from the REG procedure). */

/* Whenever SAS reads in a dataset or creates a new dataset, it will internally
store it as a temporary file in the WORK directory unless you deliberately
save it as a permanent file. (Permanent files are useful when working with
very large files that take a long time to process, but are unnecessary for
the small datasets used in this class.) When the program stops executing,
all of the temporary files are automatically deleted from WORK. Obviously,
the original dataset as well as the LOG and RESULTS files remain. */

/* In SAS, each line of code is ended with a semicolon. As a general practice,
it is a good idea to include the command ‘run;’ after each data step and
procedure which will temporarily stop the compiling and execute any code
since the last “run” command. */

/* ————————————————————————–
PART ONE: READ IN THE DATA AND CREATING NEW VARIABLES
————————————————————————– */

/* The code below uses a data step to read in the mroz.txt file and assign it
the name ‘mroz’. In SAS, there are many, many acceptable data formats and
ways to read in data. Here we use a basic approach that always works: using
a DATA step to read in a tab-delimited file. The pathway for the data file
is identified during the INFILE statement. If you are unable to read in a
data file, it is often due to providing the wrong pathway. In the INFILE
statement,

“dlm=’09’x” identifies the tab delimiter

“dsd” tells SAS to not treat consecutive delimiters as a single delimiter
(for instances in which a field may be blank)

“lrecl” is the longest record length in the data (the default value is 276,
so below it is set arbitrarily large at 5000 to ensure that the there is no
issue with any dataset used in this course)

“firstobs” indicates the row of the first data record (and is set equal to 2
because the first row of the dataset has the field headers) */

/* The list of variable names is provided in the INPUT statement. The default
variable format is numeric. If a character variable is read in, the variable
name should be followed by “:$w.” where ‘w’ is the maximum field length.
(For instance, if one field contains the two-letter abbreviation for a
state, it would appear in the INPUT statement as “state :$2.”) */

data mroz;
infile “~/my_courses/ngoldst4/mroz.txt” dlm=’09’x dsd lrecl=5000 firstobs=2;
input inlf hours kidslt6 kidsge6 age educ wage repwage hushrs husage
huseduc huswage faminc mtr motheduc fatheduc unem city exper
nwifeinc;
run;

/* Two useful diagnostic checks can be performed using the CONTENTS procedure,
which lists the variable names and formats in a dataset, and the MEANS
procedure, which provides summary statistics about the numeric variables. */

proc contents data=mroz;
run;

proc means data=mroz;
run;

/* The DATA step below reads in the temporary “mroz” dataset and creates the
“workingonly” dataset that retains observations for women in the workforce
and creates the “lwage” and “expersq” variables that are required for the
analysis. */

data workingonly;
set mroz;
where inlf=1;
lwage = log(wage);
expersq = exper**2;
run;

/* We can visually checking whether ‘workingonly’ includes the ‘lwage’ and
‘expersq’ variables by using the PRINT procedure to print the data in the
RESULTS file. */

proc print data=workingonly;
run;

/* ————————————————————————–
PART TWO: EXECUTE A REGRESSION AND OUTPUTTING THE RESULTS
————————————————————————– */

/* Most SAS procedures have two types of outputs: output that is generated
automatically and output that is generated upon request using the Output
Delivery System (ODS). For instance, the REG procedure (which executes a
single-equation linear regression) automatically generates a table of
parameter estimates (called “outest”); it also can generate a slew of ODS
tables, including an ANOVA table for the regression or the estimated
variance-covariance matrix. A complete list of ODS tables for each procedure
is provided in the on-line documentation.

In some instances, a procedure has an ODS table that contains the same
information as in an automatically-generated table but in a more useful
format. For instance, “outest” provides the parameter estimates in a row,
whereas the ODS table “ParameterEstimates” provides the parameter estimates
and their standard errors in a column. */

/* The REG procedure executes a simple linear regression. The intercept is
included by default.

“outest = beta_hats1” stores the automatically-generated parameter estimates
in a temporary dataset called ‘beta_hats1’.

“/ acov hccme=0” tells the REG procedure to use robust standard errors
(the “acov” is short for asymptotic covariance matrix; the “hccme” is short
for heteroskedasticity consistent covariance matrix estimation).

“output” creates temporary datasets of basic output from the regression. The
output statement below tells the reg procedure to create a dataset called
“temp” that includes all of the variables in “workingonly” as well as the
fitted residual (called uhat) and the fitted dependent variable (called yhat)

“ods output” triggers the Output Delivery System and generates one called
ParameterEstimates (which is saved as ‘beta_hats2’), one called ANOVA (which
is saved as ‘anova_table’), and one of the robust variance-covariance matrix
called ACovEst (which is saved as ‘acov_beta_hats’). */

proc reg data=workingonly outest=beta_hats1;
model lwage = exper expersq educ age kidslt6 kidsge6 / acov hccme=0;
output out=temp r=uhat p=yhat;
ods output ParameterEstimates=beta_hats2 ANOVA = anova_table
ACovEst = acov_beta_hats;
run;

/* We can use the PRINT procedure to print the requested dataset to the
RESULTS tab. To print specific variables, use the “var” statement
followed by a list of the variables. */

proc print data=beta_hats1;
run;

proc print data=beta_hats2;
run;

proc print data=beta_hats2;
var Variable Estimate HCStdErr HCProbt;
run;

/* ————————————————————————–
PART THREE: PERFORM HYPOTHESIS TESTS OF PARAMETER RESTRICTIONS
————————————————————————– */

/* The TEST statement tells the REG procedure to perform a test of parameter
restrictions. The parameters are identified by their regressor: for
instance, “test age=0” specifies a test of whether the coefficient on age is
statistically different from zero. */

/* The code below performs a non-robust F test of the joint hypothesis that the
parameters on age, kidslt6, and kidsge6 equal zero. A table of test results
is automatically generated in the RESULTS file when the TEST statement is
invoked. The code also requests the ODS table of test results TestANOVA
(which is retained as ‘F_test’). */

proc reg data=workingonly;
model lwage = exper expersq educ age kidslt6 kidsge6;
test age=0, kidslt6=0, kidsge6=0;
ods output TestANOVA = F_test;
run;

proc print data=F_test;
run;

/* The TEST statement will automatically use a robust Wald test when the robust
variance-covariance matrix is used. The corresponding ODS table of test
results is ‘ACovTestANOVA’ (which we name Wald_test). */

proc reg data=workingonly;
model lwage = exper expersq educ age kidslt6 kidsge6 / acov hccme=0;
test age=0, kidslt6=0, kidsge6=0;
ods output ACovTestANOVA = Wald_test;
run;

proc print data=Wald_test;
run;

/* The code below performs a Lagrange Multiplier test of the joint significance
of the coefficients on age, kidslt6, and kidsge6. */

/* first, perform the restricted regression and retain all of the fields in
‘workingonly’ as well as the fitted residuals (uhat) in the ‘temp’
dataset */

proc reg data=workingonly;
model lwage = exper expersq educ;
output out=temp r=uhat;
run;

/* second, perform the regressions of each excluded variable on the included
variables and add to the ‘temp’ dataset:
(1) regress age on exper, expersq, and educ and save the residuals
as ‘r1hat’
(2) regress kidslt6 on exper, expersq, and educ and save the residuals
as ‘r2hat’
(3) regress kidsge6 on exper, expersq, and educ and save the residuals
as ‘r3hat’ */

proc reg data=temp;
model age = exper expersq educ;
output out=temp r=r1hat;
run;

proc reg data=temp;
model kidslt6 = exper expersq educ;
output out=temp r=r2hat;
run;

proc reg data=temp;
model kidsge6 = exper expersq educ;
output out=temp r=r3hat;
run;

/* third, use a DATA step to generate the regressors uhat*r1hat, uhat*r2hat,
uhat*r3hat, and a field of ones */

data temp;
set temp;
uhat_r1hat = uhat*r1hat;
uhat_r2hat = uhat*r2hat;
uhat_r3hat = uhat*r3hat;
ones = 1;

/* fourth, regress 1 on uhat*r1hat, uhat*r2hat, and uhat*r3hat, suppressing
the intercept using the ‘noint’ option. Output the ODS table ANOVA (which
we name ‘anova_table’) which provides the sum of squared residuals */

proc reg data=temp;
model ones = uhat_r1hat uhat_r2hat uhat_r3hat / noint;
ods output ANOVA = anova_table;
run;

proc print data=anova_table;
run;

/* we are interested in the value n-SSR (which is given as ‘SS’ in
‘anova_table’) and its p-value. When we print ‘anova_table’, however,
there is no p-value but there is a lot of information we do not need. We
can use a DATA step to clean up the results. The code below reads in
‘anova_table’, uses the WHERE statement to select on the record for which
the Source field equals ‘Model’, renames the sum of squares (SS) as
‘ChiSq’, and uses the ‘probchi’ function to generate the p-value for the
test. The KEEP option retains the two variables of interest in ‘LM_test’.
*/

data LM_test(keep = ChiSq ProbChiSq);
set anova_table;
where Source=’Model’;
ChiSq = SS;
ProbChiSq = 1 – probchi(SS,DF);

proc print data=LM_test;

/* ————————————————————————–
PART FOUR: USEFUL CODE FOR MERGING DATASETS
————————————————————————– */

/* In some instances we have variables in different datasets that we want to
use together. For instance, we may have coefficient estimates in one table
and variable means in another, and we want to join the datasets so that we
can calculate an average partial effect. In order to merge two datasets,
there must be one or more fields that are common to the datasets and, for at
least one of those datasets, uniquely identifies an observation.

The code below calculates the mean wage and then merges it back into the
‘workingonly’ dataset. After using the MEANS procedure to calculate the
‘mean_wage’ and outputting it to a file called ‘temp’, a DATA step assigns
a variable called ‘merge_flag’ (which is set equal to 1). The same
variable is created in the ‘workingonly’ dataset and then, in a third DATA
step, the MERGE statement is used to join the ‘workingonly’ and ‘temp’
datasets using the common ‘merge_flag’ field. The resulting ‘workingonly’
dataset now includes a mean wage variable (which is the same for each
observation). */

proc means data=workingonly noprint;
var wage;
output out=temp(keep = mean_wage) mean=mean_wage;

data temp;
set temp;
merge_flag=1;

data workingonly;
set workingonly;
merge_flag=1;

data workingonly(drop = merge_flag);
merge workingonly temp;
by merge_flag;

proc print data=workingonly; Microeconometrics 440.618. Week 2 Problem Set Content Owned by N. Goldstein

1. In Problem 8 of Problem Set 1 we considered the estimator = 1
2

of the parameter = 1
2

.

Assuming that =
(
1
2

)
is asymptotically normally distributed, use the Delta Method to

find the estimate of the asymptotic standard error of if

=

1.5

0.5

Avar() =

1 0.4
0.4 2

2. We know from Problem 7(b) in Problem Set 1 that, when the dependent variable y is ex-
pressed as a log, the exact percentage change in yi from a one-unit change in a discrete xj is
exp{j}1. Consider the vector function

g() =

exp{1}1

exp{2}1

Using the Delta Method, find the estimator of the asymptotic variance-covariance matrix of
g() as a function of 1, 2, Avar[1], Avar[2], and Acov[1, 2].

3. Let and be two consistent, asymptotically normal estimators of the P 1 parameter
vector with Avar[

n( )] = V1 and Avar[

n( )] = V2. Define the Q 1 param-

eter vector g() for which g() is a continuously differentiable function. Show that, if
is asymptotically efficient relative to , then g() is asympotically efficient relative to
g(). (Hint: first express Avar[

n()] and Avar[

n()] using the Delta Method.)

4. This problem illustrates the ambiguity that can be caused by the invariance of the Wald
statistic. Let be an asymptotically normal estimator for the scalar > 0. Let = log() be
an estimator of = log().

(a) Show that is a consistent estimator of .

(b) Using the Delta Method, find the asymptotic variance of in terms of the asymptotic
variance of .

(c) Suppose that, for a sample of data, = 4 and var[] = 4. What are the estimates and
var[]?

(d) What is the t-statistic for testing H0 : = 1 given the results in (c)?

(e) State the null hypothesis in (d) equivalently in terms of , and use and var[] in (c)
to test that null. What do you conclude?

Page 1

Microeconometrics 440.618. Week 2 Problem Set Content Owned by N. Goldstein

5. This problem uses data from attend.txt which contains 680 observations about student class
attendance and academic achievement. The variables include:

Variable Name Variable Label
attend classes attended out of 32
termgpa GPA for that term
priGPA cumulative GPA prior to that term
ACT ACT score
final final exam score
hwrte percent of homework turned in
frosh =1 if freshman
soph =1 if sophomore
stndfnl standardized final exam score

(a) These data include students from multiple classes. The standardized final score stndfnli
is calculated as finalix

sx
, where x and sx are the mean and standard deviation of final for the

course attended by student i. Why is it sensible to use stndfnl rather than final as a measure
of academic achievement?

(b) Let atndrtei be the attendance rate (i.e., attendi/32). To determine the effect of attend-
ing lecture on final exam performance, estimate

stndfnli = 0 + 1 atndrtei + 2 froshi + 3 sophi + ui

by OLS. Provide the partial effect of a change in the attendance rate on the standardized final
score and its robust standard error.

(c) How confident are you that the OLS estimate in (b) is estimating the causal effect of
attendance? Explain.

(d) As an alternative to robust standard errors, estimate the equation in (b) by weighted
least squares (WLS). To do this, generate ui from an OLS regression and calculate u2i as an
estimate of var[ui|xi]; then weight the data by 1

u2i
and re-estimate by OLS. (Remember to

weight all dependent and independent variables, including the intercept.) Provide the partial
effect of a change in the attendance rate on the standardized final score and its standard error,
and explain the assumptions that underlie the validity of the estimation.

(e) Add priGPA and ACT to the equation in (b) as proxy variables for student ability and
explain how this changes the estimated partial effect and its robust standard error. (We will
cover the theory involving proxy variables in detail during Lecture 3.)

(f) Using the estimation in (e), perform two different testsa robust Wald test and a non-
robust CR testof the significance of atndrte. Do you reach the same conclusion in each test?
(Note that, in an OLS setting, the non-robust CR test of parameter restrictions is commonly
called referred to as an F-test. Also, to say one is testing the significance of a variable
is shorthand for testing whether the coefficient on that variable is statistically different from
zero.)

Page 2

Microeconometrics 440.618. Week 2 Problem Set Content Owned by N. Goldstein

(g) Using the estimation in (e), perform a robust LM test of the significance of atndrte two
different waysusing the traditional matrix form of the statistic, and using the regression-
based version. Do you obtain the same result? (Note: Using the traditional matrix form of
the statistic does not require that you to form and multiply the matrices yourself. Statistical
software like SAS and Stata use the matrix form of the statistic in any procedure that includes
the LM test statistic as an option.)

(h) Using the estimation in (e), perform a robust Wald test of the null hypothesis H0 :
2 = 3 using two different methods and show that both options produce the same test
statistic. First, use the sum-of-a-variance formula to calculate the standard error of 2 3,
which you can calculate by hand. Second, rewrite the equation so that the linear combination
2 3 enters as a single parameter, denoted , and reestimate the equation.

(i) Add quadratics (i.e., squares) of priGPA and ACT and the interaction term priGPA
ACT as regressors in the equation in (e), and de-mean the appropriate variables such that the
average partial effect of a change in priGPA on the standardized final score is identified by
a single parameter. Estimate this modified equation and provide an estimate of that average
partial effect and its robust standard error.

(j) Would you feel confident using the estimation in (i) to perform hypothesis tests involv-
ing 0? Why or why not?

6. This problem uses data from nls80.txt which contains observations about the wages and
characteristics of 935 working men in 1980. These data were used by Blackburn and Neumark
(1992) (Unobserved Ability, Efficiency Wages, and Interindustry Wage Differentials, Quar-
terly Journal of Economics 107, 1421-1436) to estimate the determinants of wages. The variables
include:

Variable Name Variable Label
wage monthly earnings
hours average weekly hours
IQ IQ score
KWW knowledge of world work score
educ years of education
exper years of work experience
tenure years with current employer
age age in years
married =1 if married
black =1 if black
south =1 if lives in south
urban =1 if lives in SMSA
sibs number of siblings
brthord birth order
meduc mothers years of education
feduc fathers years of education

Consider the population model

Page 3

Microeconometrics 440.618. Week 2 Problem Set Content Owned by N. Goldstein

log(wagei) = 0 + 1 experi + 2 tenurei + 3 marriedi + 4 southi + 5 urbani+

6 blacki + 7 educi + abilityi + ui

Note that ability is unobserved.

(a) Why is it sensible to use log(wage) rather than wage as the dependent variable?

(b) Ignoring ability, estimate the model by OLS using robust standard errors. Provide 95%
confidence intervals for the estimated return to education (i.e., the estimated partial effect of
an extra year of education on the log wage) and the estimated log wage differential between
black and non-black workers.

(c) Perform a robust Wald test and a non-robust CR test of the joint significance of educ
and black. Do you reach the same conclusion in each test?

(d) Explain how to convert your non-robust CR test statistic in (c), which is asymptotically
distributed as an F, into one that is asymptotically distributed as a 2. Do you reach the same
conclusion using either statistic?

(e) Using the estimates from (b), calculate the exact percentage changes in wage in re-
sponse to a change in educ and black, respectively. Write in matrix form the robust Wald
statistic for a test of their joint significance, which is a function of 6, 7, Avar[6], Avar[7],
and Acov[6, 7]. (Hint: You have already found the formula for the relevant asymptotic
variance-covariance matrix in Problem 2.)

(f) Consider the model in (b) but add as regressors iq, kww, and three interaction terms:
iq educ, iq kww, and iq educ kww. Try to perform a RESET test for neglected nonlinearities
by adding {y2, y3, y4}. Why does it fail? Adjust the procedure to successfully perform the
test.

(g) Using h(xi) =
{
yi, y

2
i

}
, perform a robust Wald test of homooscedasticity in u for the

model described in (f). What does the result tell you about the validity of your F-test in (c)?

7. [Extra Credit] It is common in economic models to express the dependent and indepen-
dent variables as natural logs and interpret the coefficient on the independent variable as an
elasticity. In Problem 6 of Problem Set 1 we considered the strong assumption about u under
which this is valid. This problem examines a second issue, namely that the log-log regression
strategy is feasible if and only if y and x are positive; one cannot take the natural log of a
nonpositive number. In Problem 5, stndfnl can assume a negative value, and therefore any
elasticity must be calculated from the formula E[yi|xi]

xji
xji
E[yi|xi]

.

(a) Using the estimation in Problem 5(e), provide an estimate of the average elasticity of
stndfnl in response to a change in ACT . Calculate its robust standard error, noting that the
average elasticity is a function of both parameters and variables and therefore you will need

to separately calculate the components 1
n
Avar[g(xi,yi,)], 1n

n
i=1

G(xi,yi, ), and Avar[].

(b) Comparing the results in (a) with the results of Problem 5(e), the average elasticity

Page 4

Microeconometrics 440.618. Week 2 Problem Set Content Owned by N. Goldstein

found in (a) appears to have the wrong sign. Why did this happen? (Hint: examine the
values of i.)

(c) Comparing the results in (a) with the results of Problem 5(e), the average elasticity
is very imprecisely estimated whereas the estimated partial effect of ACT is very precisely
estimated. Provide some intuition for why this occurs.

(d) Repeat the calculation in (a) but ignore the most extreme values of . (You can, for
instance, eliminate the smallest and largest values.) What do you find?

Page 5 Microeconometrics 440.618. Handout #1 Content Owned by N. Goldstein

Estimating the Asymptotic Standard Errors of Vector Functions

I. Overview

This handout derives the asymptotic variance-covariance matrix estimators of a vector func-
tion g(). Although the most general derivation requires the use of Score vectors and Hessian
matrices that are not formally introduced until Lecture 9, that derivation is presented here in
order to provide a unified framework for all of the cases that arise in this course.

The Delta Method. The first variance-covariance matrix estimator considers Avar[g()], the
simplest setting in which g() depends on the parameter estimates only. In this setting g(),
does not vary by cross section unit i. The resulting formula is referred to as the Delta Method:

Avar[g()] = G() Avar[] G()

for which G() is the Jacobian (i.e., the matrix of partial derivatives) of g().

The General Formula. The second estimator considers Avar[g(wi, )], the far more com-
plicated setting in which g() depends on both parameter estimates and random variables
wi = {yi,xi} (with y endogenous and x exogenous). This formula can accommodate situ-
ations in which one wants to impose assumptions about the distribution of y|x as well as
situations in which no such assumptions are made. Because g() varies by cross section unit

i, the measurement of interest is usually the average g = 1
n

n
i=1

g(wi, ), and therefore the

variance-covariance matrix estimator of interest1 is

Avar[g] = 1
n
Avar

[
g(wi, )

]
+ G Avar[] G 1

n
gs H1 G 1

n
G H1 gs

for which, denoting G(wi, ) as the Jacobian of g(wi, ), s(wi, ) as the Score vector, and
H(wi, ) as the Hessian matrix, and 0 as the true value of ,

Avar[g(wi, )] =

1
n

n
i=1

Ey[g(wi,0) g(wi,0)
|xi]

(
1
n

n
i=1

Ey[g(wi,0)|xi]
)(

1
n

n
i=1

Ey[g(wi,0)|xi]
)

if imposing assumptions about y|x and expectation has closed-form solution

1
n

n
i=1

g(wi, ) g(wi, )

(

1
n

n
i=1

g(wi, )

)(
1
n

n
i=1

g(wi, )

)
otherwise

1This estimator is most commonly used for conditional moment tests with quasi-maximum likelihood estima-
tion, which are introduced in Lecture 11. There are, of course, measurements other than g that can be calculated,
but their variance-covariance matrix estimators are not addressed in this course.

Page 1

Microeconometrics 440.618. Handout #1 Content Owned by N. Goldstein

G =

1
n

n
i=1

Ey[G(wi,0)|xi]
if imposing assumptions about y|x and
expectation has a closed-form solution

1
n

n
i=1

G(wi, ) otherwise

H =

1
n

n
i=1

Ey[H(wi,0)|xi]
if imposing assumptions about y|x and
expectation has a closed-form solution

1
n

n
i=1

H(wi, ) otherwise

gs =

1
n

n
i=1

Ey[g(wi,0) s(wi,0)
|xi]

if imposing assumptions about y|x and
expectation has a closed-form solution

1
n

n
i=1

g(wi, ) s(wi, )
otherwise

There are three special cases that greatly simplify the second estimator:

Special Case #1: g() is a function of and xi but not yi.2 In this setting, g(xi,) is uncorre-
lated with s(wi,) such that gs = 0, resulting in

Avar[g] = 1
n
Avar[g(xi, )] +

(
1
n

n
i=1

G(xi, )

)
Avar[]

(
1
n

n
i=1

G(xi, )

)

Special Case #2: g() is a function of only. In this setting, g() is uncorrelated with s(wi,),
and g() and G() do not vary with i. Therefore, Avar[g()] = 0, G = G(), and gs = 0,
resulting in the Delta Method formula given above.

Special Case #3: g() is a function and wi = {xi,yi}, has an expectation of zero, and the
entire conditional distribution of yi|xi is both correctly specified and imposed during the
estimation.3 In this setting, E[s(wi,0) s(wi,0)] = E[H(wi,0)], E[g(wi,0) s(wi,0)] =
E[G(wi,0)], and Avar[g(wi, )] = E[g(wi,0) g(wi,0)]. Therefore, ss = H and gs =
G, resulting in

Avar[g] = 1
n
Avar[g(wi, )] + G Avar[] G

for which
2This case most commonly arises when g(xi, ) represents the estimated partial effect for cross section unit i

and therefore g represents the average partial effect.
3This case is most commonly used for conditional moment tests with conditional maximum likelihood estima-

tion, which are introduced in Lecture 11.

Page 2

Microeconometrics 440.618. Handout #1 Content Owned by N. Goldstein

Avar[g(wi, )] =

1
n

n
i=1

Ey[g(wi,0) g(wi,0)
|xi] if expectation has closed-form solution

1
n

n
i=1

g(wi, ) g(wi, )
otherwise

G =

1
n

n
i=1

Ey[G(wi,0)|xi] if expectation has closed-form solution

1
n

n
i=1

G(wi, ) otherwise

II. The Delta Method: Estimating Avar[g()]

A. The Derivation

A mean-value expansion of g() around the true value 0 produces

g() = g(0) + G() ( 0)

for which G() 5 g() is the Jacobian of g() and the qth row of G() is evaluated at
an unknown value q that is trapped between q and 0q. Because plim[] = 0 and is
trapped between and 0, it must be that plim[] = 0. By the Slutsky Theorem,

plim[G()] = G(plim[]) = G(0)

Substituting,

g()
a
g(0) + G(0) ( 0)

which implies

n
[
g()g(0)

]
a
G(0)

n ( 0)

When the Central Limit Theorem applies to the estimation of (which is always the case for
the procedures covered in this course),

n
(
0

)
a N (0,V)

for some positive-definite matrix V. By the Continuous Mapping Theorem,

Page 3

Microeconometrics 440.618. Handout #1 Content Owned by N. Goldstein

G(0)

n ( 0)

a N(0,G(0) V G(0))

Substituting,

n
[
g()g(0)

]
a N(0,G(0) V G(0))

Substituting consistent parameter estimates for parameters and sample averages for popula-
tion moments,

Avar[g()] 1
n
G() V G() = G() 1

n
V G() = G() Avar[] G()

B. Examples

For the examples below, suppose that we have the consistent parameter estimates

=

1

2

and the variance-covariance matrix of the parameter estimates

Avar[] =

Avar[1] Acov[1, 2]

Acov[2, 1] Avar[2]

Note that, when applying the Delta Method, the Jacobian will always be of dimension QP ,
for which Q is the number of restrictions (i.e., the number of rows in g()) and P is the number
of parameters that comprise .

Example 1. Consider the asymptotic variance of the function g(1) = log(1). Because g(1)
is a scalar function of one parameter, its Jacobian will be a scalar function of one parameter
given by

G(1) =
g(1)
1

= 1
1

(This is why, in this example, both g() and G() are unbolded.) Therefore,

Avar[g(1)] = G(1) Avar[1] G(1) = 1
1
Avar[1] 1

1
= 1

21
Avar[1]

Example 2. Consider the asymptotic variance-covariance matrix of the vector function

Page 4

Microeconometrics 440.618. Handout #1 Content Owned by N. Goldstein

g(1) =

g1(1)

g2(1)

=

log(1)

exp{1}

Because g(1) is a vector function of dimension two involving one parameter, its Jacobian will
be a 21 vector of that parameter given by

G(1) =

g1(1)
1

g2(1)
1

=

11

exp{1}

(This is why, in this example, g() and G() are bolded.) Therefore,

Avar[g(1)] = G(1) Avar[1] G(1)

=

1
1

exp{1}

Avar[1] ( 11 exp{1} )

Example 3. Consider the asymptotic variance of the function g() = log(1 2). Because g()
is a scalar function of two parameters, its Jacobian will be a 1 2 vector of two parameters
given by

G() =
(

g()
1

g()
2

)
=
(

1
1

1
2

)
(This is why, for this example, g() is unbolded but G() is bolded.) Therefore,

Avar[g()] = G() Avar[] G()

=
(

1
1

1
2

) Avar[1] Acov[1, 2]
Acov[2, 1] Avar[2]

1
1

1
2

=
(

1
1
Avar[1] + 1

2
Acov[2, 1] 1

1
Acov[1, 2] + 1

2
Avar[2]

)
1
1

1
2

= 1
1
Avar[1] 1

1
+ 1

2
Acov[2, 1] 1

1
+ 1

1
Acov[1, 2] 1

2
+ 1

2
Avar[2] 1

2

= 1
21
Avar[1] + 1

22
Avar[2] +

2
12

Acov[1, 2]

Page 5

Microeconometrics 440.618. Handout #1 Content Owned by N. Goldstein

Example 4. Consider the asymptotic variance-covariance matrix of the vector function

g() =

g1(1, 2)

g2(1, 2)

=

log(1 2)

exp{1 2}

Because g() is a vector function of dimension two involving two parameters, its Jacobian
will be a 22 vector of two parameters given by

G() =

g1()
1

g1()
2

g2()
1

g2()
2

=

11 12

2 exp{1 2} 1 exp{1 2}

(This is why, for this example, g() and G() are bolded.) Therefore,

Avar[g()] = G() Avar[] G()

=

11 12

2 exp{1 2} 1 exp{1 2}

Avar[1] Acov[1, 2]

Acov[2, 1] Avar[2]

1

1
2 exp{1 2}

1

2
1 exp{1 2}

=
(
2
1
Avar[1] + 2 Acov[1, 2] + 1

2
Avar[2]

)
1

Leave a Comment

Your email address will not be published. Required fields are marked *