首页 > > 详细

讲解留学生Matlab语言程序、Matlab讲解留学生、讲解留学生Matlab

plot the overlapping densities.
c) At the top of the code is a variable ⇢ which governs the correlation between X and U.First,
set ⇢ = 0 and run the code. Report the estimated means in the biased and unbiased samples. The
true value of � = 2. Perform. a two-sided t-test for each sample on whether or not
ˆ
� is statistically
di↵erent from 2. As a reminder, to do a t-test, first calculate the mean and the standard deviation,
then construct the t-statistic. You should report two separate t-statistics for this exercise (one for
each of the 0/1 groups).
d) Now set ⇢ = .55. Plot the distribution of
ˆ
� by group. Then repeat (c) for the biased group. Is
ˆ
� now statistically significantly di↵erent from 2?
e) Repeat (d) for ⇢ = .01. Relative to the sampling variation in
ˆ
�, does the bias seem too important
here? (No rigorous answer).
f) Increase the sample size to N = 500 and rerun the code for ⇢ = .5. What happens to the
variance of
ˆ
� in both when samples are biased and not? What does this exercise suggest about the
usefulness of having a large sample size when your estimator is biased?
??g) Optional problem for those interested in exploring computation. Increase the number of sam-
ples to 500 (this is the S variable in the code). Fix the number of observations to 100 and let
⇢ = .25. In this case, calculate the fraction of the time that you would estimate
ˆ
� to be statistically
significantly indistinguishable from 2 despite the bias. Hint: You will first need to calculate the
upper and lower bound on
ˆ
� at which you would not reject the null hypothesis with � =2and the

2
ˆ

as calculated in the sample.
3. College and Distance Using the “distance to college” data, run the following regressions.
Make sure to report your regressions in a table format (you may hand write it, in which case only
report the coe�cient on distance, or use the stargazer option below). Each row should have the
name of an independent variable, with the key variable of interest dist in the first row. Each row
should also report the robust standard error in parenthesis below the coe�cient estimate. Each
column should correspond to a di↵erent specification (each time you run a regression). The last
few rows for each regression should report the R
2
and the adjusted R
2
.
These first two regressions do not need to be included in a table.
2
a) First, regress ed on female. Test for a statistically significant di↵erence in college attendance
rate for women and for blacks.
b) Now, create a variable called male that is equal to 1 minus female. Regress ed on male and
explain how this is related to the first regression.
The remaining regressions with numbered specifications should be in one table.
c) For specification (1) regress ed on dist only. What is the estimated slope?
d) For specification (2) also include the demographic data on the student (Gender, Race, Ethnic-
ity). For multiple regression the following format might be of use -
1 m2 $25,000 per year/ 0 = Income ≤ $25,000 per year.
ownhome 1= Family Owns Home / 0 = Family Does not Own Home
urban 1 = School in Urban Area / = School not in Urban Area
cue80 County Unempolyment rate in 1980
stwmfg80 State Hourly Wage in Manufacturing in 1980
dist Distance from 4yr College in 10's of miles
tuition Avg. State 4yr College Tuition in $1000's

Years of Education: Rouse computed years of education by assigning 12 years to all
members of the senior class. Each additional year of secondary education counted as a
one year. Student’s with vocational degrees were assigned 13 years, AA degrees were
assigned 14 years, BA degrees were assigned 16 years, those with some graduate
education were assigned 17 years, and those with a graduate degree were assigned 18
years.



联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!