Problem Set 4 - Econ 140 - Summer 2013
Solutions by Jrmie Cohen-Setton, Zhen Sun
Note: This assignment must be done with GRETL for full credit.
1. Demonstrate that = (X X)1 X y
Answer: is such that it minimizes the SSR. Given y = X + , and y = X + e, we h
Problem Set 6 - Econ 140 - Summer 2013
Solutions by Jrmie Cohen-Setton, Zhen Sun
Note: This assignment must be done with GRETL for full credit.
Use the Gas data to answer the following:
lgaspcarit = 1 + 2 lincomep + 3 lrpmg + 4 lcarpcap + uit
1. Estimate
Problem Set 2 - Econ 140 - Summer 2013
Solutions by Jrmie Cohen-Setton, Zhen Sun
Note: This assignment must be done with GRETL for full credit.
1. Use le Ramanathon 3-6 on the PR data disk to calculate the mean, standard deviation,
and skewness of Persona
ECON 140 Summer 2012 - PROBLEM SET 4
Solutions by GISs Jrmie Cohen-Setton and Elira Karaja
1. Using the GRETL prepackaged data set Ramathan data 7.14, Homicide across
States, complete the following. Variables are those as defined by the GRETL
descripti
Problem Set 3 - Econ 140 - Summer 2013
Solutions by Jrmie Cohen-Setton, Zhen Sun
Derivation of Least-Squares Parameter Estimates
Model: Yi = + Xi + i , i = 1, ., N
N
Least Squares: M ina,b
2
Yi Yi
, where Yi = a + bXi
i=1
FOC:
a
b
N
N
(Yi a bXi )2 = 2
Section 15, ECON 140
GSI: Zhen Sun
Final Review1
Wed, Aug 14th, 2013
In this section, we will rst go over all the relevant tests we covered in this part of the course,
and then look at an empirical example to review the techniques we learned in this class
1
Problem Set 5
1. Using the GRETL prepackaged data set Ramathan data 7.14, Homicide across States,
complete the following.
a. Estimate and report OLS parameter estimates for the equation
Mr=+1exec+2south+4 ue+5capital+6pcy+
Model 1: OLS, using observatio
1
Problem Set 5
1. Using the GRETL prepackaged data set Ramathan data 7.14, Homacide across States,
complete the following.
a. Estimate and report OLS parameter estimates for the equation
Mr=+1exec+2south+3+4 ue+5capital+6pcy+
b. Plot mr on exec, mr on ue
PS4 SOLUTIONS
JEREMIE COHEN-SETTON, ELIRA KARAJA
1. Demonstrate that = (X X)1 X y
is such that it minimizes the SSR. Given y = X + , and y = X + e, we have
SSR = e e.
e e = (y X ) (y X ) [by denition]
= (y X )(y X ) [by (A + B) = A + B and (AB) = B A ]
Problem Set #5
Instrumental Variables
Econometrics 140
1. Use the GRETL data set kmenta.gdt to estimate the structural equations:
Q d 0 1 P 2 D 1
and
s
Q 0 1 P 2 F 2
where Q is food per capita (quantity); P is the ratio of food price to a cost of living i
University of California, Berkeley
Economics Department
Economics 140
Scott Carson
ln( per car gas consumptioni ,t ) 1 2 ln(
real incomei ,t
Carsi ,t
) 3 ln( gas pricei ,t ) 4 ln(
) ui ,t
capita
Capita
Use the Gas data to answer the following:
1. Estimate
Midterm 2 - Econ 140
Solutions by Edson Severnini
I. Denition/Diagnostics
A) Durbin-Watson Test
1. Test for autocorrelation.
2. H0 : No autocorrelation.
3. DW 2(1 ).
4. Durbin-Watson.
B) White Test
1. To test for heteroskedasticity.
2. H0 : No heteroskeda
1
ECON 140 Summer 2013 - PROBLEM SET 5
Solutions by GISs Jrmie Cohen-Setton and Zhen Sun
Problem Set 5
1. Using the GRETL prepackaged data set Ramathan data 7.14, Homicide across
States, complete the following.
a. Estimate and report OLS parameter estimat
Homework 4
1. Using matrix notation, demonstrate that given y=X+
1
OLS X T X X T y
2. Using matrix notation, demonstrate that given y=X+
R2
T X T X
Y TY
3. Demonstrate that the OLS error term can be written as
eI X XTX
1
X T y My
4. Demonstrate that M
Introduction
Econometrics is the application of statistical tools to economic outcomes. Economics
4307 is designed to give you the tools necessary to correctly construct models that test economic
theory. These notes have been written to accompany the text
1
Homework 1
Complete and show all your work
1. Given the following functional forms, find dy/dx for each:
A)
y=x2+2x+1
B)
y=x3+4x2+5x+1
C)
y=ln x2+x2
D)
y=x2+2xz+z2
E)
Find dy/dz given y=x2+2xz+z2
2. Given y=x10, find dy/dx, d2y/dx2, d3y/dx3, d4y/dx4, an
Problem Set 3 - Econ 140 - Summer 2012
Solutions by Jrmie Cohen-Setton
Derivation of Least-Squares Parameter Estimates
Model: Yi = + Xi + i , i = 1, ., N
N
Least Squares: M ina,b
i=1
Yi Yi
2
, where Yi = a + bXi
FOC:
b
N
(Yi a bXi ) = 2
N
a
(Yi a bXi )
Introduction to Regression
Above we considered the relationship between two variables X and Y with the
covariance and correlation. Economics frequently tries to explain the relationship between two
variables, such as consumption and GDP or age and wealth.
Problem Set 6 - Econ 140 - Summer 2013
Solutions by Jrmie Cohen-Setton, Zhen Sun
Note: This assignment must be done with GRETL for full credit.
1. Use the GRETL data set kmenta.gdt to estimate the structural equations:
Qd = 0 + 1 P + 2 D + 1
Q s = 0 + 1 P
1
Autocorrelation and Hetroskedasticity
Having considered the multivariate CLRM, we now want to consider cases when our
assumptions are broken. In such cases, OLS estimates are no longer BLUE and we must look to
alternative models to correct for lost effi
Transformations, Dummy Variables and Joint Tests
The parameter estimates in both the single variable and multivariate CLRM were linear
in both the parameters and variables. When the parameters are non-linear, OLS is unable to
account for deviations from l
Problem Set 1 - Econ 140 - Summer 2013
Solutions by Jrmie Cohen-Setton, Zhen Sun
1. Given the following functional forms, nd
dy
dx
for each:
(a) y = x2 + 2x + 1
Answer:
dy
dx
= 2x + 2
(b) y = x3 + 4x2 + 5x + 1
Answer:
dy
dx
= 3x2 + 8x + 5
(c) y = ln x2 +
1
Homework 2
Note: This assignment must be done with GRETL for full credit.
1. Use file EX32 on the PR data disk to calculate the mean, standard deviation, and skewness of
Personal Consumption Expenditures (GC). Plot the GC histogram and non-parametric ke
Final - Econ 140
Solutions by Edson Severnini
I. Denition/Diagnostics
1. [Hausman test]
(a) Test for endogeneity.
(b) H0 : No endogeneity.
(c) For the endogenous variable case, follow a two-step procedure:
First step: Run an OLS regression of the endogeno
Economics 140 Syllabus
General. This course provides an introduction to statistical analysis of economic data, also
known as Econometrics. You should have taken both microeconomics andmacroeconomics (either
the Econ 100A/B or 101A/B series, or the equival
1
Problem Set 2
Solutions by Jeremie Cohen-Setton
Note: This assignment must be done with GRETL for full credit.
1. Use file broiler.gdt on the Gretl tab to calculate the mean, standard deviation, and
skewness of per capita chicken consumption. Plot the c
Section 11 - Econ 140
GSI: Alessandra, Byoungchan, Hedvig, and Jeremie
Binary Dependent Variables (Yi = 1 or Yi = 0)
1
Economists are often interested in the factors behind the decision-making of individuals or enterprises:
Why do some people go to colle
Section 2 - Econ 140
GSI: Alessandra, Byoungchang, Hedvig, Jeremie
1
Theory
1.1
Population versus sample
Population: set of individuals, firms or any other entities with something in common.
Sample: subset of the population that we use to test something
Section 12 - Econ 140
GSIs: Alessandra, Byoungchan, Hedvig and Jeremie
1
Warm-up: Binary Choice Models
1. SW E11.2: This exercise uses the same Smoking data as the one we solved last time (SW E11.1). Last time
we estimated LPMs relating the probability of
Section 14 - Econ 140
GSIs: Alessandra, Byoungchan, Hedvig and Jeremie
1
Experiments
1.1
Basic model
Yi = 0 + 1 Xi + ui , where:
Yi is the dependent variable
Xi is a treatment dummy
Xi = 1, if individual i was randomly included in the treatment group
Section 1 - Econ 140
GSI: Alessandra, Byoungchang, Hedvig, Jeremie
1
Introduction
Simple linear regression: In theory, we have the following consumption function, which you have studied
in ECON 100B or 101B.
C = a + bYd ,
where C is an aggregate consumpt