当前位置:天才代写 > 作业代写,留学生作业代写-北美、澳洲、英国等靠谱代写 > Homework代写 exercise代写 bivariate regression model代写 calculate代写

Homework代写 exercise代写 bivariate regression model代写 calculate代写

2020-09-23 16:19 星期三 所属: 作业代写,留学生作业代写-北美、澳洲、英国等靠谱代写 浏览:874

Homework代写

Homework 2 (due Thursday 2-22-2018)

Homework代写 For this exercise, you will take five data points and calculate the coefficients of the bivariate regression model by hand.

1.Theoretical Homework代写

Homework代写
Homework代写

For this exercise, you will take five data points and calculate the coefficients of the bivariate regression model byhand. This is not something you would typically do, but by doing so, I hope the relevant concepts will become more concrete. You will complete this exercise using 5 data points (n = 5) which are combinations of values of a Y variable and an X variable as indicated: Homework代写

i Y X
1 2 0
2 4 0
3 3 1
4 5Homework代写 1
5 7 1

So for instance: Y1 = 2 and X1 = 0. If it helps, I had in mind the idea that Y indicates the number of college applications sent and X is an indicator (dummy) variable for female. There are a few pieces to this problem outlined below:

a)Use the formulas for the bivariate regression coefficients to calculate the coefficients α and β in the regression model:

𝑌𝑖 = 𝛼 − 𝛽𝑋𝑖 + 𝑒i

The basic formulas are:
Homework代写
Homework代写

and:

𝛼 = 𝐸[𝑌𝑖] − 𝛽𝐸[𝑋𝑖]

where you can find how to calculate the covariance, variance, and expectation in any resource about statistics.

b)Find the difference in mean the mean value of 𝑌𝑖 for individuals with 𝑋i = 1 instead of 𝑋i = 0. This should be the same as your coefficient β.

c)Copy the table above and extend it by including columns for the fitted value of 𝑌𝑖 and the resulting residual for 𝑌𝑖, and residual squared for 𝑌𝑖 as well as three additional columns described below.Homework代写

d)Calculate the residual and the residual squared for each observation based on a value of β either one greater than or 1 less than the value of β you calculated. (If you found β = 8 then calculate the fitted values, resiudals, and resiudals squared based on β= 7 or β = 9). Verify that the sum of squared residuals from the correct β is less than the sum of squared residuals from this incorrectβ.

2. and 3. Programming Questions Homework代写

2) You will be doing an exercise that builds on the 1-8 and 2-15 labs. Specifically, you need to analyze a dataset containing information about U.S. States. You will analyze summary statistics, create graphs, break the observations into groups, and run t-tests.Homework代写

Program the following steps in R. Then, copy your commands into a document, comment on them (using #) and submit the document as the answer to question 2. Please email my TA the code (document with commands) at so248516@ohio.edu with the phrase “ECON 4850 HW 2” in the subject heading.

Dataset notes: This is a dataset about the 50 U.S. states in the 1970’s. A description of the dataset was in homework 1.

Instructions: Homework代写

A.Place or find the folder you have been using for this class on the computer. Create a new subfoldercalled “HW 2”.

B.Change the project to the folder you just

C.The dataset we are going to use x77 should be on your computer. But, make your own copy of the dataset using the followingcommand:

myState2 <- as.data.frame(state.x77) Homework代写

Normally we wouldn’t need the as.data.frame part, but this dataset is weird.

D.Make a dummy variable called “BigState” that indicates if a state has more than 2,500,000 (Remember that Population is measured in1,000’s.)Homework代写

E.Create a new dataframe “myState3” that contains both myState2 and the new BigState

F.Look at the summary statistics for the new

G.Use the cov command to find the covariance between Income and

H.Use the var command to find the variance ofBigState Homework代写

I.Run a bivariate regression with Income determined by BigState: Specification1:

𝐼𝑛𝑐𝑜𝑚𝑒𝑖 = 𝛼 + 𝛽1𝐵𝑖𝑔𝑆𝑡𝑎𝑡𝑒𝑖 + 𝑒i

J.Verify that the coefficient from this regression is the same as the ratio of the covariance between Income and BigState to the variance of

K.Create a variable called Density that contains the ratio of Population to

L.Add the Density variable to the myState3 Homework代写

M.Run the following regression specification:

Specification 2:

𝐼𝑛𝑐𝑜𝑚𝑒𝑖 = 𝛼 + 𝛽1𝐼𝑙𝑙𝑖𝑡𝑒𝑟𝑎𝑐𝑦𝑖 + 𝛽2𝐷𝑒𝑛𝑠𝑖𝑡𝑦 + 𝑒i

N.Run a finalregression:

𝐼𝑛𝑐𝑜𝑚𝑒𝑖 = 𝛼 + 𝛽1𝐼𝑙𝑙𝑖𝑡𝑒𝑟𝑎𝑐𝑦𝑖 + 𝛽2𝐷𝑒𝑛𝑠𝑖𝑡𝑦 + 𝛽3𝑀𝑢𝑟𝑑𝑒𝑟𝑖 + ei

Specification 3:

O.Submit a printed version of your code with comments along with the answers to questions 1 and 3. Email your code to the TA at so248516@ohio.edu with “ECON 4850 HW 2” in the subject

3. Interpret your results: use your STATA results from 2 to answer these questions Homework代写

a.Answer the following questions about yourdata:

ⅰHow many observations do youhave?

ⅱHow many variables are in thedataset?

ⅲFind the mean and standard deviation for BigState andIncome

b.Specification1:

ⅰAssuming the regression in specification 1 is correctly specified, what is the interpretation of the coefficient on BigState? Give a reason why you might have guessed this coefficient would be positive. Give a reason why you might have guessed this coefficient wouldbe

ⅱWas the result statistically significant? How do we knowthis?Homework代写

ⅲVerify (by showing your work) that the coefficient on BigState can be calculated as shown on the bottom of page 86 of the “Mastering Metrics” text (or the formula for Beta shown in Problem

c.Specification2:

ⅰAssuming the regression in specification 2 is correctly specified, what is the interpretation of the coefficient on Density?

ⅱWas the effect of Density statistically significant? How do we knowthis?

ⅲAssuming the regression in specification 2 is correctly specified, what is the interpretation of the coefficient on Illiteracy?Homework代写

d.Specification3:

ⅰAssuming the regression with independent variables in specification 3 is correctly specified, what is the interpretation of the coefficient on Density? Explain why the coefficient might have changed (relative to specification2).

ⅱWas the effect of Density statistically significant? How do we knowthis?

Homework代写
Homework代写

更多其他:考试助攻 代写作业 加拿大代写 北美cs代写 统计代写 经济代写 计算机代写 数学代写 考试助攻 其他代写

合作平台:天才代写 幽灵代写 写手招聘 Essay代写

 

天才代写-代写联系方式