代写 stata ECN 190 Econometrics

ECN 190 Econometrics
University of California, Davis Prof. Shu Shen

Homework Assignment #1 (Due on 4/12)

Written problems:

The following table gives the joint distribution of X and Y.

X=0
X=1
X=2
Y=0
0.1
0.2
0.1
Y=1
0.3
0.3
0

What is the marginal distribution of X?
Calculate P(Y=1|X=1)
Calculate P(X=1|Y=1)
Calculate E(Y)
Calculate E(Y|X=1)

Computer problems:
Use Davis2008.dta.
Use the substr and as.numeric function in Stata to generate new variables representing the year and month of the closing date.
Restrict the sample to sales of single-family houses with close dates in 2018.
Run a regression of sale price on month of closing and test the overall significance of the regression with 5% significance level.
How would you obtain heteroskedastic robust standard errors in the above regression if you think the homoskedasticity assumption is violated?
Run a regression of sale price on list price and days on market. How do you interpret the slope coefficients of this regression? Do you think the zero conditional mean condition is satisfied here?
Add house characteristics to the above regression model and test the joint significance of all newly added house characteristics variables.
Review your ECN 102 (or STA 108, ECN 140, etc…) notes on regressions with quadratic terms. Now, add a quadratic term of DaysOnMarket to the regression in e. For houses with the same list prices, what is the predicted difference in sale price if a house stays on market a week longer than the other?

Use the RENTAL.dta dataset. This dataset comes from the Wooldridge textbook. It includes rental prices and other variables of 64 college towns for the years of 1980 and 1990.
Review your ECN 102 (or STA 108, ECN 140, etc…) notes on regressions with log transformed variables. Regress log of rent (lrent) on log of pop (lpop), log of avginc (lavginc), and pctstu using only 1990 data. Interpret the slope coefficient of lavginc as well as pctstu. Do you think the zero conditional mean assumption is satisfied here?
The variable clrent only has non-missing values in 1990. Verify those values are equal to the change in lrent in each city between year 1980 and year 1990. Recall that changes in log transformed variables could be interpreted as % changes in the original variable. Notice that clrent is equal to .5516071 for city 1. How do you interpret this number?
Finally, we regress change in lrent (clrent) on change in lpop (clpop), change in lavginc (clavginc), and change in pctstu (cpctstu) between year 1980 and year 1990. How do you interpret the intercept here? Explain what the zero conditional mean assumption is requiring in this regression.