讲解:Graphics、R、R、R scriptsDatabas

2020-01-13  本文已影响0人  jinghanling

1. Suppose X1, X2, . . . , X9 are iid N(μ, 4) variables. We wish to test H0 :μ = 1 against H1 : μ = 3(a) Calculate the size and power of the test with rejection region X >ˉ2.(b) Find k so that the test with rejection region X > k ˉ has size 0.05.Calculate the power of this test.2. The data set big.mac is part of a larger data set described in Cook andWeisberg, “Applied Regression Including Computing and Graphics,”Wiley, 1999.Download the data file, the data is available on moodle. Read the datainto R.The Big Mac hamburger is a simple commodity that is virtually identicalthroughout the world. One might expect that the price of a BigMac should be the same everywhere, but of course it is not the same.The Economist magazine has published a Big Mac parity index, whichcompares the costs of a Big Mac in various places, as a measure ofinefficiency in currency exchange. We will use these data to study howthe cost of a Big Mac varies with economic indicators that describeeach city. The variables in the data are logBigMac (log of minutes oflabour required by an average worker to buy a Big Mac and french fries)logBu代做Graphics留学生作业、R课程作业代写、代做R编程设计作业、代写R scripts留学生作业 代做DatabassFare (log of lowest cost of 10km public transit in US dollars)logTeachSal (log of annual salary of a primary teacher in US dollars)and logTeachTax (log of tax rate paid by a primary teacher).For the following, please provide R scripts that you use and the correspondingoutput, including any relevant graphs to support your answers.(a) Fit a linear model with logBigMac as the response and the remainingvariables as predictors.(b) Is there any evidence that any of the assumptions of the linearregression model is not satisfied?(c) Examine residuals and other diagnostics for the fitted model. Arethere any unusual or influential points?2(d) Examine the summary output: based on the summary output, doyou think that any of the predictors could be deleted from themodel? Please state any relevant statistical tests you used to baseyour conclusion on.(e) Consider two alternative models: the model including all predictors,and the model where the predictor logBusFare and logTeachTaxare deleted. Use the F statistic, stating clearly any hypothesisbeing tested, and the conclusions reached regarding the two predictors.3转自:http://www.7daixie.com/2019041830873794.html

上一篇下一篇

猜你喜欢

热点阅读