STAD29 / STA 1007 assignment 1

Hand in the indicated questions. In preparation for the questions you hand in, it is worth your while to work through (or at least read through) the other questions as well. What you hand in needs to include (i) your code, (ii) the output that your code produced and (iii) your comments on the output as asked for in the questions. The easiest way to get this is to use an R Notebook and preview the results (to HTML or Word or PDF) when you are done. Hand in your work on Quercus. If you did STAC32 last fall, it’s the same procedure. A reminder is here: You are reminded that work handed in with your name on it must be entirely your own work. It is as if you have signed your name under it. If it was done wholly or partly by someone else, you have committed an academic offence, and you can expect to be asked to explain yourself. The same applies if you allow someone else to copy your work. The grader will be watching out for assignments that look suspiciously similar to each other (or to my solutions). Besides which, if you do not do your own assignments, you will do badly on the exams, because the struggle to figure things out for yourself is an important part of the learning process. Before you start, you’ll need this: library(tidyverse) ## — Attaching packages ———————————- tidyverse 1.2.1 — ## v ggplot2 3.1.0 v purrr 0.2.5 ## v tibble 1.4.2 v dplyr 0.7.8 ## v tidyr 0.8.1 v stringr 1.3.1 ## v readr 1.1.1 v forcats 0.3.0 ## — Conflicts ————————————- tidyverse_conflicts() — ## x dplyr::filter() masks stats::filter() ## x dplyr::lag() masks stats::lag() 1. Work through, or at least read, problems 13.12, 13.13, 13.14, and 13.18 in PASIAS: http://ritsokiguess. site/pasias/ 2. At a certain small college, students take a test when they first enrol. Do the results of this test help to predict a student’s first-year grade point average? Some data was collected, in http://www.utsc. There are two columns: first-year GPA and the score on the test. (a) (2 marks) Read in the data and display (the first ten lines of) what you have. (b) (3 marks) Draw a suitable plot of the data. Describe briefly what you see. (c) (2 marks) Fit a regression predicting first-year GPA from the test score, and display the results. (d) (2 marks) Is there a significant relationship between test score and first-year GPA? Does this surprise you, given what you saw in your graph? Explain briefly. (e) (3 marks) Obtain confidence intervals for the mean first-year GPA for students that have test scores 20 and 25.


(f) (2 marks) Which of your two confidence intervals is longer? Explain briefly why that is not surprising. 3. Work through, or at least read, chapter 16 of PASIAS. 4. Coronary heart disease affects many people. Is there an association between a person having significant evidence of coronary heart disease and the person’s age? 100 subjects were selected to participate in a study. For each person these four things were recorded: • an ID for that person (which we ignore) • the person’s actual age, to the nearest year • the “age group” in which the person falls • whether the person has “significant evidence of coronary heart disease” (“Yes”) or not (“No”). The data are at as a CSV file. (a) (2 marks) Read in and display (at least some of) the data. To make the next part easier, call your data frame heart. (b) (2 marks) I wanted to have you plot the proportion of people in each age group that have significant symptoms against age group. This turns out to be a bit fiddly, but this code does it. Replace the initial data frame with whatever name you gave to the data frame you read in from the file (if you called it something different): heart %>% group_by(agegrp, chd) %>% summarize(n=n()) %>% spread(chd,n) %>% mutate(proportion=Yes/(Yes+No)) %>% ggplot(aes(x=agegrp, y=proportion))+geom_col() Run this code (by typing it or copy-pasting it). What does your graph tell you about how the likelihood of having symptoms depends on age? Explain briefly. (c) (2 marks) Fit a logistic regression predicting presence or absence of coronary heart disease from the (actual) age. Use the data frame you read in from the file, and display the results. (d) (3 marks) Is there a significant association between age and presence of significant symptoms of coronary heart disease? If there is, what kind of relationship is it? Explain briefly but carefully, using the output from this part only. (e) (3 marks) An alternative format for the same data is in d29/chdage2.csv. Read the data

#STAD29 #STA #assignment

Share This Post


Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Health Care Management Ethics – Thesis on Death With Dignity Act

First, select a topic with both legal and ethical implications faced by professionals in the healthcare setting. Your final paper will discuss the multitude of legal viewpoints, ethical issues, and issues of inter-professionalism related to your topic. You will be required to discuss how values, ethics, and sense of inter-professionalism

Task 2: Argumentative Research Paper- Organic foods verses GMOs

Writing a research paper gives you an opportunity to explore a topic of special interest, research that topic, and organize your research findings in writing for an academic audience.   Through your preparation work, you have established an argumentative thesis statement and have planned a clear organization of your main

M3A1: Citizens United (copy and paste the link) Review Campaign Finance: Abuses and Reforms. [Video File] [48 min 25 sec] before you participate in this activity. Parts of the video will discuss aspects of campaign finance and reform. Before engaging in this activity, please return to the first discussion topic on political

The decision in Williams v Roffey Bros signals that the courts in

The decision in Williams v Roffey Bros signals that the courts in deciding whether or not to enforce a promise, may be guided less by technical questions of consideration than by questions of fairness, reasonableness and commercial utility.   The assignment will be in accordance with the following criteria: •

Management and Organizational Behavior.

Description Exercise 17: Read Annual Pay Raises (W-68-69). This is located in the color-coded workbook section in the back of your book. ( Uhl-Bien, M., Osborn, R. N., & Schermerhorn, J. R. (2014).) Organizational Behavior. Hoboken, NJ: Wiley. ISBN:9781118517376 Review the exercise and complete steps 1 and 2. For this


Determination of Human Subjects Research Form and my project proposal. please, research about IRB. write the Description. Referencing the Determination Checklist on Page 2, briefly describe project objectives, the subject population and types of data/specimens to be collected and analyzed, how the data/specimens will be obtained, and why you determined

Company Description and SWOT

Non Alcoholic Beverage company!!!! n this assignment, you will conduct a SWOT (Strength, Weakness, Opportunity, and Threat) analysis for the type of beverage you have selected, and for your company overall. As you work on the assignment, consider why you have chosen one type of non-alcoholic beverage over another and

Oral Language chart of phone conversation

Instructions In an APA formatted paper, paste the template found in doc. sharing. Define each of the terms and then watch the video of two children talking on the phone. Rate the language development of one of the two children in the video found at Use the SOLOM. Using

Motivations of Private-Sector Organizations

 Presidential Policy Directive 8 (PPD-8) is part of the national preparedness goal and provides a description for preparing for the threats in an all-hazards approach that pose the greatest risk to the United States. Community preparedness is a shared responsibility of the whole community. In addition to the public sector

Effective Resource Allocation

 The discussion assignment for this week includes a review of the Key Assignment Outline completed by one of your classmates, as well as a substantial response to at least one other student. Primary Task Response: Your first task is to post your own Key Assignment Outline to the discussion area

Ethics Case Study

A student’s analysis of the ethic case must use the following written structural framework, which can be written as a memorandum to the file. Without the bullet points – these indicate required headings for each of the four sections. The following the description heading below to form a memorandum to

The Relativist Ethical Position.

 In your post, address the following: To what extent would you agree with the view that research should rely on a relativist ethical position—rules or duties may vary across different communities and professional groups? What examples could you suggest to support this view? References: – Doing Research in a Business

Poverty in the classroom

A four-unit research paper in APA formatting centered around the effects of poverty in education. The first unit needs to be about the effects poverty has on students in the classroom and needs to be 8-10 pages. Second unit is on the effects of substance abuse on students in the

Causes of America’s War in Vietnam

Description Formatting 12 font or smaller, standard script (e.g. Calibri, New Times Roman), 1.00-1.25 margins maximum, double spaced, clean appearance, etc. Basic organization is simple— don’t make it difficult Title— choose one that reflects your views on the topic to inform and engage your reader from the start, do not

International Finance

1. Discuss different ways that dominant investors use to establish and maintain the control of the company with relatively small investments. 2. Following corporate scandals and failures in the U.S. and abroad, there is a growing demand for corporate governance reform. What should be the key objectives of corporate governance

Information Systems-Decision Making

 1. Identify one cyberattack that occurred in the last 2 years. What caused the cyberattack? How did the cyberattack impact data loss, financial loss, cleanup cost, and the loss of reputation? If you were the manager of this company, what are some key steps you would have taken to prevent

sexual harassment

 (Sexual harassment is the “idea” in every sentence mentioned) Description: reflect on how and why sexual harassment “idea” is useful to the study of deviance and/or crime. Relevance: Here, you will discuss how this idea challenges common sense/common knowledge assumptions about people or activities that are deemed deviant or illegal.

Attack and Penetration Test

 Description Scenario: You are the owner and operator of a small information security consulting firm. You have received a request from one of your clients, Infusion Web Marketing, that you provide a written proposal for performing a penetration test on the company’s production Web servers and corporate network. Environment: Scope