Homework2
1. Polyunsaturated fatty acids in the diet favorably affect several risk factors for cardiovascular
disease. The principal dietary polyunsaturated fat is linoleic acid. To test the effects of dietary
supplementation with linoleic acid on blood pressure, 17 adults consumed 23 g/day of safflower
oil, high in linoleic acid, for 4 weeks. Systolic blood pressure (SBP) measurements were taken at
base-line (before ingestion of oil) and 1 month later, with the mean values over several readings at
each visit given in “Hypertension.txt”, please answer the following questions:
1.1 What parametric test could be used to test for the effect of linoleic acid on SBP?
Perform. your chosen parametric test.
1.2 What nonparametric test could be used to test for the effect of linoleic acid on SBP?
Perform. your chosen nonparametric test.
(Hint: In these questions if you want to do a test, you should state the Null and the Alternative
hypothesis firstly, and then do the test just using R. Finally, draw conclusions
(i.e. statistical inference here). R scripts and results are both needed.)
1.3 Please draw a QQ-plot to see if the data fit normal distribution, and compare your results
above, discuss which method you feel is more appropriate here.
(Hint: QQ-plot can be drawn using R function: qqnorm(μ1-μ2) and qqline(μ1-μ2))
2. A study looked at the effects of OC use on heart disease in women 40 to 44 years of age. The
researchers found that among 5000 current OC users at baseline, 13 women developed a
myocardial infarction (MI) over a 3-year period, whereas among 10,000 non-OC users, 7
developed an MI over a 3-year period.
2.1 Assess the statistical significance of the results.
2.2 Display the MI data in the form. of a 2 × 2contingency table.
2.3 Compute the expected table for the OC−MI data
2.4 Assess the OC−MI data for statistical significance, using a contingency-table approach.
(hint: Yates-corrected chi-square test for a 2 × 2 contingency table)
3. A study is interested in how the assemblages of amphibian larvals varied between depression
wetlands with different hydrological regimes. A following question is whether the presence of
fish, which only occurred in wetlands with long hydroperiods, also affected the assemblages of
larval. 22 wetlands are sampled and recorded of the species richness (Richness column) and total
abundance of amphibian larvals (Abund column, all in wetland.txt). Wetlands were also classified
into three hydroperiods – short (6 wetlands), medium (5) and long (11) – the latter being split into
those with fish and those without . The short and medium hydroperiod wetlands did not have fish.
(a) Calculate the means and variances and draw boxplots for species richness across the wetland
categories. Are the variances similar? Now fit a single factor ANOVA model and provide the
residuals. Any evidence of skewness or unequal variances?
(Hint: Use ‘tapply’ function to calculate mean and var from different Hydro. And ‘anova’ function
for variance analysis)
(b) Re-run the single factor ANOVA but include two specific contrasts: firstly, is there any
difference between the groups with and without fish of long hydroperiod wetlands, and secondly,
is there any difference between the three hydroperiod types without fish. What specific null
hypotheses are being tested? What statistical conclusions would you draw from the overall
ANOVA and each of the two contrasts? Provide a biological explanation.
(Hint: Give statistical hypotheses firstly, do the ANOVA test with corresponding Data subset)
(c)How much of the variation in species richness is explained by the four groups?
(d) If you did not have specific planned contrasts in mind, an unplanned multiple comparison test
would be appropriate to compare all four groups in a pairwise fashion. Compare the conclusions
from such a test to those from the two planned contrasts – which is the better method?
(Hint: Analysis pros and cons for each technique)
Notes:
1. Data file: “wetland.txt”.
2. File contents:
Hydro Hydroperiod treatment (Short: short
hydroperiod; Medium:
medium hydroperiod; Longnofish: long
hydroperiod without fish;
Longfish: long hydroperiod with fish)
Richness number of species of larval amphibians in
each wetland
Abund abundance of all species of larval amphibians
in each wetland