代做R程序、R编程作业帮做、代做R实验作业、R编程作业帮做

H1S / 1002 HS -Winter 2018 Assignment # 2What factors a ect baby birth weight?Due: In Crowdmark via Blackboard by 10pm on Tuesday, February 13, 2018.Late assignments will be subjected to a penalty of 5% per hour late.Grading: The grand total for this assignment is 100 marks.Instructions:Use R (or R Studio) to do the analysis for the following questions.Use a benchmark signi cant level of 5%.Compile your solution as a PDF document (Word, LaTeX or Rmarkdown can be your base).Presentation of solutions is very important. Your assignment should have two main sections-Solutions and Appendix. Include relevant plots and quote relevant numbers from your Routput for your solutions. In the Appendix, include your R code and other output. Amaximum of 10 marks will be awarded for excellent presentation.Write and submit your own work. For instance, personalized your code as much as possible,using your rst name. All plots produced must be given a title with the last 4 digitsof your student number.Where appropriate, your answers are expected to be written in plain English.The DataThe source of these data is Stat Labs by Nolan and Speed. For the purposes of this assignment asubset of the full data is used and can be found in a le named bw.csv&” on Blackboard.This data was used to compare the birth weight of babies born to mothers who were smokers tothose whose mothers were nonsmokers in order to determine whether they corroborate the SurgeonGeneral’s warning that: Smoking by pregnant women may result in fetal injury, premature birth,and low birth weight.&” Our data consists of measurements from 409 babies. Many other questionswere investigated as part of this study, however we will focus on the following two questions:1. Does smoking by mother during pregnancy a ect baby birth weight?2. Does baby birth weight change with gestation maturity?The variables in the dataset are:bwt- baby’s weight at birth in ouncesgestation- number of days spent in the wombsmoke- an indicator variable which is 1 if the baby’s mother smoked and 0 if she did not smokeduring pregnancy.1. (15 marks) Create two new variables: (1) maturity- by converting gestational age to a factorwith 3 levels; 1 if the baby was preterm and spent less than 259 days in the womb, 3 if gestationalage was beyond 293 and 2 otherwise, and (2) MatSmoke- a variable that combines maturity leveland maternal smoking status. You can use the following R code to do this:1maturity=array(0,length(gestation))MatSmoke=array(0,length(smoke))for (i in 1:length(gestation)){if (gestation[i]293){maturity[i]=3}else {maturity[i]=2}}for (i in 1:length(smoke)){if (maturity[i]==1 & smoke[i]==1){MatSmoke[i]=&”PreSmoke&”}else if (maturity[i]==1 & smoke[i]==0){MatSmoke[i]=&”PreNoSmoke&”}else if (maturity[i]==2 & smoke[i]==1){MatSmoke[i]=&”NorSmoke&”}else if (maturity[i]==2 & smoke[i]==0){MatSmoke[i]=&”NorNoSmoke&”}else if (maturity[i]==3 & smoke[i]==1){MatSmoke[i]=&”PostSmoke&”}else {MatSmoke[i]=&”PostNoSmoke&”}}Construct three sets of side-by-side boxplots: 1. to compare birth weight between mothers whosmoked and those who did not smoke during pregnancy, 2. to compare birth weight among thethree maturity levels, and 3. to compare birth weight among the 6 categories of babies groupedby the combination of their maturity level and maternal smoking status. Do there appear to beany di erences?2. (10 marks) Using the R t:test procedure, investigate whether or not there is a di erence inthe mean birth weight between babies born to mothers who were smokers and babies born tomothers who were nonsmokers.3. (15 marks) Investigate whether or not there is a di erence in mean birth weight among babiesclassi ed by gestational maturity, using a one-way analysis of variance. If there is a di erenceamong the levels of maturity, carry out an appropriate analysis to see which levels of maturitydi er.4. (15 marks) Use one-way analysis of variance to investigate whether or not there is a di erencein mean birth weight among the six categories of babies classi ed by the combination of theirmaturity level and mother’s smoking status. If there is evidence of di erences among the sixcategories of babies, carry out an appropriate analysis to see which di er.5. (10 marks) Do you trust the results of the statistical tests carried out in question 4? Assesswhether the necessary assumptions of the model hold.26. (10 marks) Instead of the one-way classi cation model used in question 4, a two-way analysisof variance model could have been used with maternal smoking status, maturity level and theirinteraction. WITHOUT tting this model, answer the following questions.(a) Would the number of predictor variables be the same as in the model used in question 4?Why or why not?(b) Would the F-test for the presence of interaction between maturity level and smoking statusbe statistically signi cant? How do you know from your results of question 4?7. (5 marks) Should we be concerned that the data contained di erent numbers of babies in thethree maturity levels? Why or why not?8. (5 marks) Discuss the use of gestation as a quantitative explanatory variable rather than as afactor in an additive linear model for mean birth weight. Include mathematical equations todescribe the di erence in models for mean birth weight.9. (5 marks) Name two additional potential factors of baby birth weight and brie y describe theirlevels.本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

你或许想:《去原作者写文章的地方

「点点赞赏,手留余香」

    还没有人赞赏,快来当第一个赞赏的人吧!
0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论