Part 1: (30 points)
In myeconlab, complete the assignment HW 4 Chp 8-10.
Part 2: (70 Points)
Question (1) College distance (35 points)
The data file CollegeDistance contains data from a random sample of high school seniors interviewed in 1980 and re-interviewed in 1986. In this exercise, you will use these data to investigate the relationship between the number of completed years of education for young adults and the distance from each student’s high school to the nearest four-year college. (Proximity to college lowers the cost of education, so that students who live closer to a four-year college should, on average, complete more years of higher education.) A detailed description is given in College Distance_Description, also available on the BlackBoard.
Note: ln(x) is the mathmatical notation for the natural log of x. The R function however is log(x)
a. Run a regression of ED on Dist, Female, Bytest, Tuition, Black, Hispanic, Incomehi, Ownhome, DadColl, MomColl, Cue80, and Stwmfg80.
i. If Dist increases from 2 to 3 (that is, from 20 to 30 miles), how are years of education expected to change?
ii. If Dist increases from 6 to 7 (that is, from 60 to 70 miles), how are years of education expected to change?
iii. For both answers, are the results statistically signficiant; based on what evidience? Report 95% confidence intervals.
b. Run a regression of the log of years of education, ln(ED) on Dist, Female, Bytest, Tuition, Black, Hispanic, Incomehi, Ownhome, DadColl, MomColl, Cue80, and Stwmfg80.
i. If Dist increases from 2 to 3 (from 20 to 30 miles), how are years of education expected to change?
ii. If Dist increases from 6 to 7 (from 60 to 70 miles), how are years of education expected to change?
iii.For both answers, are the results statistically signficiant; based on what evidience? Report 95% confidence intervals.
c. Run a regression of ED on Dist, Dist^2, Female, Bytest, Tuition, Black, Hispanic, Incomehi, Ownhome, DadColl, MomColl, Cue80, and Stwmfg80.
i. Are dist and dist^2 statistically signficant?
ii. If Dist increases from 2 to 3 (from 20 to 30 miles), how are years of education expected to change?
iii.If Dist increases from 6 to 7 (from 60 to 70 miles), how are years of education expected to change?
d. Do you prefer the regression in (c) to the regression in (a)? Explain.
e. Consider a Hispanic female with Tuition = $950, Bytest = 58, Incomehi = 0, Ownhome = 0, DadColl =1, MomColl =1, Cue80 = 7.1, and Stwmfg = $10.06. Be very careful with these units when you plug them into your new dataset with the predict() function. Double check CollegeDistance_DataDescription. Remember, you can find the predicited values of a model at particular values doing something like this in R:
YrsPredicted_linear=data.frame(dist=seq(0,10,1),PredictedYears=predict(m1,newdata=data.frame(dist=seq(0,10,1), female=1, bytest=58, ......)))
This will create a new dataframe with 2 variables. One is ``dist“, that takes values in a sequence: 1,2,3...10. The second variable `` PredictedYears“ are the expected years of education given the coeficient estiamtes from a stored model m1 and the specific values given by the newdata argument. You can do the same thing for the second order ploynomial model from part (c), I called that one YrsPredicted_squared.
i.Plot the regression relation between Dist and ED from (a) and (c) for Dist in the range of 0 to 10 (from 0 to 100 miles). Describe the similarities and differences between the estimated regression functions.
Hint: You can use the following code to take the predicited data you created (above I called mine YrsPredicted_linear) to plot the linear model in (a) to the 2nd order polynomial in (c). The argument: type=“l“ makes the plot a line plot, rather than the defualt scatter plot. The function lines adds a line plot on top of whatever plot you have most recently generated.
plot(YrsPredicted_linear,type="l")
lines(YrsPredicted_squared)
ii Would your answer change if you plotted the regression function for a white non-hispanic male with the same characteristics?
How does the regression function (c) behave for Dist >10? How many observation are there with Dist >10?
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme