讲解:STA302/1001、R、data、RJava|Database

STA302/1001 - Assignment # 4Due Friday April 10 by 11:59PM on CrowdmarkStudent 1 Name:Student 1 Email:Student 2 Name:Student 2 Email:Instructions:Assignments must be submitted electronically through Crowdmark. Each student will receive apersonalized link to view the assignment (this is where you will submit your assignment whenfinished). If you do not receive this email from Crowdmark, check your spam/junk folder. Instructionsfor how to upload completed assignments can be found here: https://crowdmark.com/help/completing-and-submitting-an-assignment/. Note that only PDF, PNG or JPGfile types are accepted by Crowdmark. You will need to upload certain questions into certainplaces, so make sure you are submitting pages in the right place.Students may work in groups of no more than 2 people, with only one assignment submitted toCrowdmark per group. When you receive your personalized link to the assignment, you may thenenter your group members name. A shared submission link will be sent to both group members, soyou can both submit the assignment or edit submissions. Only one assignment should be submittedper group.The assignment is divided into four questions, each with subparts. Each question needs to be uploadedunder the correct section in Crowdmark, otherwise it may be overlooked when graded. Onequestion is a calculation-type question, one will be a theoretical/derivation/proof type question, andone will involve using R. You should make sure to show all your work with the first two questions,while the R questions should be presented in a report-type format (i.e. include output and graphswith written explanations of answers in the main document, R code places in an appendix at theend). If you are comfortable with RMarkdown, it is recommended to complete your assignmentwith it. Otherwise, any word processing document will suffice for the R question. You may submithandwritten answers for questions 1 and 2, but they must be legible and neat.Note that there is a 20% per day late penalty on assignments. After 48 hours of being late, theassignment will no longer be accepted. This means that you should submit your assignment nolater than Sunday April 12 at 11:59PM to avoid receiving a grade of zero.1Question 1 (14 points) - Derivations/Proof QuestionThis question walks you through how to prove the equivalence of two of the formulae for theCook’s Distance using matrix notation. Suppose X(i)is the (n − 1) × (p + 1) design matrix withobservation i removed, and X is the n × (p + 1) design matrix with all observations. Let xi bea column vector representing the predictor values for observation i, and yiis the response value(scalar) for observation i. Finally, βˆ is the column vector of predictors estimated using the full data,and βˆ(i)is the column vector of predictors estimated without using observation i.(a) (2 points) Show how we would predict the response for observation i using the regressionmodel that has been fit without observation i.(b) (3 points) Using the fact that βˆ = (X0XSTA302/1001作业代做、代写R课程设计作业、代做data作业、代做R编程语言作业 帮做Java程序|代写Data)−1X0Y, and the following result,show that post-multiplication of this result by (X0Y − xiyi) yieldsβˆ(i) = βˆ − (X0X)−1xiyi +(X0X)−1xix.(d) (4 points) Using your result in (c), Question 2 (16 points) - Hand Calculation QuestionWe previously considered building multiple linear regression models for gas mileage of cars basedon characteristics of each vehicle model. We can now consider a few different models and attemptto determine which model is better.(a) (4 points) Using the table of summary values below, and that we have taken a sample of 30vehicles, compute the AIC for each of the three models. Based on these values, which modelwould you say is better?Model Predictors Residual Standard ErrorModel 1 all 11 predictors 3.227Model 2 Displacement, Horsepower, Torque, Number ofTransmission Speeds, Weight 3.245Model 3 Displacement, Horsepower, Weight 3.171(b) (4 points) Using the above summary table, calculate the corrected AIC for each of the abovemodels. Based on this, would we prefer the same model as in part (a)?(c) (4 points) Now, knowing that the sample variance of gas mileage is 39.28 MPG, find theadjusted coefficient of determination for each of the models in (a). Based on this measure,which model is preferred?(d) (4 points) Suppose we consider the smallest model (model 3 from part (a)). We can fit amodel using each predictor as a response using the remaining predictors as predictors. Belowis a summary of each of these models.Response Predictors Residual SE Sample Variance of ResponseDisplacement Horsepower, Weight 27.21 13511.05Horsepower Displacement, Weight 15.64 1993.689Weight Displacement, Horsepower 299.1 885420.2Find the Variance Inflation Factor of each predictor. Should we be concerned about multicollinearityin the model 3 from (a)?3Question 3 (14 points) - R Data Analysis QuestionUse the dataset found on Quercus under Assignment 4 materials to answer the below questions.These data contain information on 50 men, on which were measured their percent body fat, theirheight, their waist size, and their chest size.(a) (1 points) Fit a multiple linear model to predict Percent Body Fat (Pct.BF) from waist size,height and chest size.(b) (3 points) Determine whether there are any:(a) leverage points(b) outlier observations(c) influential observations. If there are, in what way do they influence the regression surface?(c) (3 points) Can we use our residual plots to make conclusions regarding which assumptionsare violated? Support your answer using appropriate plots.(d) (3 points) Determine whether the model from (a) is a valid model using appropriate plots.(e) (2 points) Determine whether there is multicollinearity among the predictor variables.(f) (2 points) Create an indicator variable for each of the observations 19 and 38. Add theseindicator variables to the model in (a) as main effect terms. Show that we have now removedthe influence of these observations from the model by showing that they no longer appear asinfluential observations.4转自:http://www.daixie0.com/contents/18/4919.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,053评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,527评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,779评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,685评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,699评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,609评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,989评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,654评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,890评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,634评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,716评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,394评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,976评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,950评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,191评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,849评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,458评论 2 342

推荐阅读更多精彩内容