Investigating obesity using scatterplots
The obesity dataset contains data from 39 men. For each man, the investigators measured the forearm skin fold (a proxy for bodyfat percentage) (FOREARM) and their height (HT) and their weight (WT).
Take FOREARM as the response variable, using scatterplots (ggplot?) answer the below question about the explanatory variables. Draw two scatterplots, one with FOREARM as the y axis and HT as the x-axis and one with FOREARM as the y axis and WT as the x-axis.
QUESTION 1
From your scatterplots, which explanatory variable is the best predictor of obesity? (We’ll define obesity as higher bodyfat i.e. larger forearm skin fold FOREARM).
| Height (HT) is a better predictor of obesity (FOREARM), as there is a clear positive relationship between HT and FOREARM. | ||
| Weight (WT) is a better predictor of obesity (FOREARM), as there is a clear positive relationship between WT and FOREARM. | ||
| Weight (WT) is a better predictor of obesity (FOREARM), as there is a clear positive relationship between height and weight. | ||
| Height (HT) is a better predictor of obesity (FOREARM), as there is a clear positive relationship between height and weight. | ||
Single explanatory variable models
First we are going to explore the data looking at only one explanatory variable at a time. Set up one linear model looking at FOREARM=HT and another using FOREARM=WT. I would then use the summary command on each (anovawould also work for what you need)
QUESTION 2
Taking FOREARM as the response variable, which of the two explanatory variables HT and WT is the best predictor of obesity when used alone in a GLM?
| WT is the best predictor. WT significantly affects FOREAM (F1,37=15.53, p-value: 0.000347), whereas HT has no significant effect on FOREARM.
|
||
| The slope for WT is 0.15298 and the slope for HT is 0.02605
|
||
| Neither of the relationships are significant according to the one explanatory variable GLM. | ||
| HT is the best predictor as it has a significant effect on FOREARM (F1,37 = 0.1754, p-value = 0.6778) |
GLM with two explanatory variables
Now create a GLM with two explanatory variables (FOREARM=WT+HT).
QUESTION 3
Using the Anova command from the car package (adjusted sum of squares), report the ANOVA statistics correctly for WT’s effect on FOREARM
| Height (HT) has a significant effect on obesity (F1,36 =25.7220 p = 1.207 x 10-5). | ||
| Height (HT) has a significant effect on obesity (F1,36 = 7.6813 p = 0.008775).
|
||
| Weight (WT) has a significant effect on obesity (F1,36 = 7.6813 p = 0.008775
). |
||
| Weight (WT) has a significant effect on obesity (F1,36 =25.7220 p = 1.207 x 10-5). |
QUESTION 4
Using the anova command (sequential sum of squares) rerun the analysis ( (FOREARM=WT+HT order of explanatory variables important!!!). Report the ANOVA statistics correctly for WT’s effect on FOREARM. Why is it different than the Anova command ouput?
| They are not different (p = 0.0087755). In a balanced and orthogonal design sequential sum of squares and adjusted sum of squares are the same thing.
|
||
| Weight (WT) has a significant effect on obesity (FOREARM) (F1,36 = 18.3334, p = 0.0001314). This is different than the reported statistics from the Anova command due to the difference between how sequential sum of squares and adjusted sum of squares are calculated. Here, we used sequential sum of squares meaning as WT was the first term in the model, it was based on all the variation in FOREARM. With adjusted sum of squares, the order of the model is unimportant and the values for WT are based on the variation left after the variation in FOREARM due to HT was eliminated.
|
||
| They are not different (p = 0.0087755). Because of the order of variables, the two types of sum of squares are equivalent.
|
||
| Weight (WT) has a significant effect on obesity (FOREARM) (F1,36 = 18.3334, p = 0.0001314). This is different because anova is the more appropriate command here. |
How does height or weight affect obesity
If you used ANOVA tables to answer the previous questions, you now know if height or weight affect obesity? But does being taller predict more obesity or less? To answer these sorts of questions you need to look at the slope of the lines. We can get these from the summary command on the lm command output. If you aren’t sure have a look back at the first year lecture which discussed how to do a regression in R (second last slide here). Briefly, if the estimate is positive, it’s a positive relationship and if the estimate is negative it’s a negative relationship.
QUESTION 5
From your summary output of lm(FOREARM~WT+HT) how do the two explanatory variables affect obesity?
| On average, as a person’s weight increases their body fat levels goes down (slope = 0.23317). As their height goes up, body fat levels increase (slope =-0.17173).
|
|||
| There is no effect of height or weight on bodyfat. | |||
| On average, as a person’s weight increases their body fat levels goes up (slope = 0.23317). As their height goes up, body fat levels decrease (slope =-0.17173).
|
|||
| On average, as a person’s weight increases their body fat levels goes down (slope = 0.23317). As their height goes up, body fat levels decreases(slope =-0.17173). | |||
| FOREARM | HT | WT | |
| 4.868 | 159.4 | 70.69 | |
| 4.671 | 163.9 | 63.93 | |
| 2.995 | 158.1 | 60.39 | |
| 3.544 | 148.1 | 56.68 | |
| 1.719 | 155.1 | 56.61 | |
| 6.297 | 153.9 | 63.72 | |
| 7.741 | 151.4 | 52.37 | |
| 7.684 | 159 | 77.99 | |
| 0.232 | 143.7 | 40.43 | |
| 9.811 | 148 | 76.16 | |
| 5.653 | 167.6 | 70.39 | |
| 3.169 | 160.8 | 63.55 | |
| 8.088 | 158.4 | 65.5 | |
| 7.25 | 153.6 | 60.94 | |
| 3.154 | 158.5 | 55.8 | |
| 2.993 | 165 | 61.46 | |
| 3.655 | 157.1 | 61.91 | |
| 1.869 | 152.3 | 55.24 | |
| 5.624 | 157.9 | 66.28 | |
| 4.451 | 161.1 | 67.26 | |
| 6.857 | 167.6 | 70.41 | |
| 0.403 | 152.2 | 48.61 | |
| 5.965 | 171.2 | 80.35 | |
| 4.563 | 156.6 | 59.7 | |
| 9.329 | 154.4 | 65.9 | |
| 5.771 | 156.3 | 66.51 | |
| 3.859 | 162.1 | 63.64 | |
| 7.784 | 166.9 | 80.93 | |
| 4.971 | 156.7 | 61.49 | |
| 3.41 | 165.3 | 60.27 | |
| 4.292 | 154.6 | 59.04 | |
| 4.942 | 167.8 | 70.12 | |
| 7.918 | 155.2 | 62.86 | |
| 6.037 | 153.3 | 58.47 | |
| 3.364 | 155.2 | 64.08 | |
| 5.282 | 160.7 | 60.08 | |
| 8.582 | 151.6 | 52.58 | |
| 4.493 | 160.5 | 66.66 | |
| 4.496 | 156.5 | 65.27 | |
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.