Exercise 5:  correlation and regression

In a study one compared two instruments for measuring the peak expiratory flow. For a sample of 8 person, one measurement was taken with a high quality instrument (called "pef" below) and one measurement was taken with a cheaper instrument that people with asthma may have at home (called "minipef" below).

 

The results are given in the table (in liters per minute)

 

Person

1

2

3

4

5

6

7

8

pef

494

395

516

434

476

413

442

433

minipef

512

430

520

428

500

364

380

445

 

a) Read the data into R and make a plot of the data. What can you see from the plot? (See the introduction to R or ask the instructors if you do not remember how to read the data into R and/or make a scatter plot of them.)

 

b) Compute the Pearson correlation coefficient. (See slide 28 from the lectures for R help.)

 

c) Find 95% confidence interval for the (theoretical) correlation coefficient. (See slide 30 from the lectures for R help.)

 

d) Fit a linear regression model with "minipef" as the outcome and "pef" as the predictor. Give an interpretation of the estimated slope, i.e. the least square estimate for "pef". (See slide 35 from the lectures for R help.)

 

e) Multiply the estimated slope from question d with the ratio of the empirical standard deviations of "pef" and "minipef". Compare the result with the Pearson correlation from question b. What do you see?