• Home
  • University of Queensland
  • Analysis Of Scientific Data
  • Linear Regression and ANOVA in Scientific Data Analysis

Linear Regression and ANOVA in Scientific Data Analysis

Analysis of Scientific Data - Semester 2, 2020 Week 10 Tutorial Part A - Linear Regression Lung function data for 25 cystic fibrosis patients in a study by O'Neill et al. (1983) was presented in Douglas Altman's Practical Statistics for Medical Research (1991). The data contains a number of variables recorded for each patient and here we are interested in the relationship between two of these, weight (weight, kg) and pemax (maximum expiratory pressure, cm of H2O). a) Write down the linear model and its assumptions to study the relationship between the response variable, pemax, and the explanatory variable, weight. y(hat) = b0 + b1*x b) The R output for the linear model is presented below. Compute the values of A and C, and then give a value for B. Coefficients: Estimate Std. Error t value Pr(>|t| ) (Intercept) weight 1.1867 63.5456 A 5.003 4.63e-05 *** 0.3009 3.944 B Residual standard error: 26.38 on C degrees of freedom A = 63.5456/5.003 = 12.7014991 B = 2*pt(-3.944,df=23) = 0.0006464141 C = 25 - 2 = 23 c) Based on the linear model, what is the estimated mean maximum expiratory pressure for patients with a weight of 50 kg? y = 63.5456 + 1.1867 * 50 = 122.8806 d) The Pearson correlation coefficient, r, between the variables pemax and weight is 0.635. Describe the strength and the direction of the relationship between pemax and weight. Moderately strong positive association e) Conduct a hypothesis test to determine whether there is any evidence of a linear association between pemax and weight. What do you conclude? Yes, we found a significant p value of 0.0006464141, giving strong evidence of a linear association Part B - ANOVA Early developmental experiences, such as incubation conditions, can have important consequences for post-hatching fitness in birds. A paper reported on a study where wood duck eggs were collected from nest boxes and experimentally incubated at various fixed temperatures, each falling within the range of temperatures of naturally incubated wood duck nests. The response variables recorded included egg mass (g) at the time of hatching. A one-way analysis of variance of egg mass by temperature in R gave the following results: Df Sum Sq Temperature 3 117.1 Residual 23 312.5 Total 27 439.6 a) How many fixed temperatures were used in this design? 4 b) How many eggs were included in this analysis? 23+3+1 = 27 c) The paper reported that the mean egg mass for the 6 eggs at 35 ? was "44.7 + 1.88 g" where they indicated that "1.88" was the standard error of the mean (SEM). Based on this statement, what was the sample standard deviation of the egg mass for those 6 eggs? Std.Error = Std.Dev/sqrt(n) Std.Dev = 1.88*(sqrt6) = 4.605 d) What is the R2 value for this model? R^2 = 117.1 / (117.1+312.5) = 117.1/429.6 = 0.272579 e) What is the F statistic used to test for the difference in mean egg mass between the different temperatures? F = MS(temp)/MS(residual) = (117.1/3) /