代写辅导接单-ECON7320: Advanced Microeconometrics

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top

ECON7320: Advanced Microeconometrics

Problem Set 2

Fu Ouyang

April 29, 2025

Instruction

Answer all questions and clearly label your answers. For empirical questions, you should show

your R script(s) and outputs (e.g., screenshots for commands, tables, and figures, etc.). You

will lose2 points

whenever you fail to provide R commands and outputs. When you are asked

to explain or discuss something, your response should be brief and compact. You should upload

your assignment (in PDF or Word format) via the “Turnitin” submission link (in the “Problem

Set 1” folder under “Assessment”) by 16:59 on the due date May 16, 2025. Do not hand in a

hard copy. You are allowed to work on this assignment in groups; that is, you can discuss how

to answer these questions with your group members. However, this isnot

a group assignment,

which means that you must answer all the questions in your own words and submit your work

separately. The marking system will check the similarity, and UQ’s student integrity and

misconduct policies on plagiarism apply.

1. Panel Data (35 points)

Background

DiTella and Schargrodsky (2004)

1

examine how the street presence of police officers reduces

car theft. Rational crime models predict that the presence of an observable police force will

reduce crime rates (at least locally) due to deterrence. The causal effect is difficult to measure,

however, as police forces are not allocated exogenously but rather are allocated in anticipation

of need (i.e., reverse causality). The innovation in DiTella and Schargrodsky (2004) was to use

the police response to a terrorist attack as an exogenous variation.

2

In July 1994, there was a horrific terrorist attack on the main Jewish center in Buenos

Aires, Argentina. Within two weeks, the federal government provided police protection to all

Jewish and Muslim buildings in the country. DiTella and Schargrodsky (2004) hypothesized

that their presence, while allocated to deter a terror or reprisal attack, would also deter other

street crimes, such as automobile theft. The authors collected detailed information on car thefts

in selected neighborhoods of Buenos Aires from April-December 1994, resulting in a panel for

876 city blocks. They hypothesized that the terrorist attack and the government’s response

were exogenous to auto thievery, thus a valid treatment. They postulated that the deterrence

effect would be strongest for any city block which contained a Jewish institution (and thus

police protection). Potential car thieves would be deterred from a burglary due to the threat of

being caught. The deterrence effect was expected to weaken as the distance from the protected

1

Di Tella, R. and Schargrodsky, E., 2004. Do police reduce crime? Estimates using the allocation of police

forces after a terrorist attack. American Economic Review, 94(1), pp.115-133.

2

DiTella and Schargrodsky (2004) is a very nice example for estimating causal effects with the difference-in-

differences approach. Since the panel data they used is balanced, we can obtain the same empirical results by

using two-way fixed effects regressions.

1

sites increased. Their sample has 37 blocks with Jewish institutions (the treatment sample) and

839 blocks without an institution (the control sample).

Questions

Use the data setDS2004.dtato estimate the following regression model:

thefts

it

0

1

D

it

t

+u

it

,(1)

where we use subscriptsiandtto label city blocks and months respectively,δ

t

is time (month)

fixed effects,D

it

=sameblock

i

×post-attack

t

, andpost-attack

t

is a binary variable indi-

cating months in the data after the terrorist attack; i.e.,post-attack

t

= 1 ifmonth≥8, and

0, otherwise. See the definitions for variablestheftsandsamebloackin the data description.

For all the questions below, exclude observations for July.

(a) (5 points) Estimateβ

1

in (1) with POLS and compute the cluster-robust SE.

(b) (5 points) Writeu

it

i

+e

it

and hence

thefts

it

0

1

D

it

i

t

+e

it

.(2)

Estimateβ

1

with random effects (RE) method and compute the RE’s default SE.

(c) (5 points) Treatα

i

in (2) as entity (block) fixed effects, estimateβ

1

with fixed effects (FE)

method, and compute the cluster-robust SE.

(d) (5 points) Run a Hausman test to compare the RE and FE estimators.

(e) (5 points) Test if the deterrence effect changes (e.g., decays) over time. To do this, you

can extend the FE regression in (c) by including four dummy variables for the interactions

of four post-attack months (September–December) withsameblock

i

and then test if the

coefficients on these interaction terms are all zero. Hint: Use theWald

test()command

in theclubSandwichpackage.

(f) (5 points) Test if the blocks under additional police protection differ from the other blocks

in terms of car thefts before the terrorist attack. To do this, you can further extend the FE

regression in (e) by including two dummy variables for the interactions of two pre-attack

months (May–June) withsameblock

i

and then test if the coefficients on these interaction

terms are zero.

3

(g) (5 points) The data has the dummy variableoneblockwhich indicates if the city block is

one block away from a protected institution. Extend the FE regression in (c) by including

one additional treatment variable–oneblockinteracted with the post-attack dummy. Use

this model to test if the deterrence effect extends beyond the same block?

2. Censored Quantile Regression (25 points)

Recall that the Tobin (1958) model studied in Problem Set 1 requires the erroreto be indepen-

dent of regressorsX, which is demanding in many economic applications.

4

This assumption is

relaxed by Powell (1984, 1986) in the conditional quantile framework. Specifically, write

Y

=q

τ

(X) +e

τ

,(3)

Q

τ

(e

τ

|X) = 0,(4)

3

Can we include the interactions of all the three pre-attack months (e.g., Apr–June) withsameblock

i

?

4

For example, it excludes heteroskedastic errors.

2

Y= max{Y

,0}(5)

forτ∈(0,1), whereq

τ

(X) :=Q

τ

(Y|X). In the literature, this is called the censored quantile

regression model.

(a) (5 points) Prove thatQ

τ

(Y|X) = max{q

τ

(X),0}. Hint: Use the equivariance property of

quantile functions.

(b) (5 points) Using (a), write a quantile regression model forYconditional onX. Hint:

Think how to remove the unobservedY

from equations (3)–(5). Reading the quick

review in Tutorial 8 may be helpful.

(c) (5 points) Assumeq

τ

(X) =X

T

β

τ

. Write the sample criterion function for estimatingβ

τ

.

Hint: Check Powell (1986). You just need to modify equation (4) in Tutorial 8.

(d) (10 points) Use the model specified in (c) to estimateβ

τ

forτ= 0.25, 0.5, and 0.75.

Here use the sameCHJ2004.dtadata for the Tobit regression in Problem Set 1 and

letY=tinkind/1000 andX= (income/1000,(income/1000)

2

). Hint: Use thecrq()

function in thequantregpackage. The syntax forcrq()is more complicated thanrq()

since it is developed for both fixed (Powell) and random censoring. To specify the classic

Powell estimator incrq(), you can write the dependent variable as

Curv(y, yc=rep(0,length(y)), ctype="left")

(i.e., eachy

i

is censored from left at 0) and add argumentmethod="Powell", all other

things are the same asrq(). Read the R document for more detailed information.

3. Hypothesis Tests and Bootstrap (40 points)

In a paper in 1963, Marc Nerlove analyzed a cost function for 145 U.S. electric companies.

Nerlov was interested in estimating acost function:C=f(Q,PL,PKF,PF) whereQis the

output,PL,PK, andPFare unit prices of labor, capital, and fuel, respectively. Use the data

Nerlove1963.dtato estimate the following Cobb-Douglass specification:

logC=β

0

1

logQ+β

2

logPL+β

3

logPK+β

4

logPF+e.(6)

(a) (10 points) Estimate model (6) with OLS and report the results (5 points). Letθ:=

β

2

3

4

. TestH

0

:θ= 1 using a Wald statistic (5 points).

(b) (10 points) Estimateθfrom (a) (2 points). Compute the bootstrap SE for

ˆ

θ(3 points)

and the bootstrap 95% confidence interval ofθusingB= 250 replications (3 points). Do

you rejectH

0

at the 5% significance level? Explain your answer (2 points).

(c) (5 points) Compute the bootstrap 95% confidence interval forθwith asymptotic refine-

ment. You can still useB= 250 bootstrap replications. Hint: Review Tutorial 7. Let

t(θ

0

) denote thet-statistic for the single restrictionH

0

:θ=θ

0

. We haveSE(

ˆ

θ) =|

ˆ

θ/t(0)|

and the Wald statistic (χ

2

1

=F

1,n−k

) forH

0

:θ= 0 equalst(0)

2

. Use$Chisq[2]($F[2])

to extract theχ

2

1

(F) statistic fromlinearHypothesis()output.

(d) (5 points) Assumee∼N(0,σ

2

). Estimate model (6) using maximum likelihood method

(5 points). You don’t need to compute SE. Hint: See page 4 of Lecture 3. You can use the

optim()function withmethod="BFGS". This is a linear regression, and so

ˆ

β

OLS

=

ˆ

β

MLE

.

You can use this fact to check your algorithm. Use transformationσ= exp(ξ) to impose

the sign restriction onσ.

(e) (10 points) Estimate model (6) underH

0

using maximum likelihood method (5 points).

Again, no need to compute SE. TestH

0

using a likelihood ratio statistic (5 points). Hint:

Review Tutorial 9.

3

51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468