[Return to Sta113 Home]

Sta113: Lab 10 (Friday, April 18, 2003)

In this lab, we will use MatLab to do the following:


Again use the data from EXAMPLE 12.13 on page 677 in the text. The dependent variable is Carbon Monoxide (CM) content of different cigarette brands. We want to investigate the relationship of three predictor or independent variables with CM, these variables are Tar (T), Nicotine (N), and Weight (W). (see page 677 for more details).

Read in the data and call the first column T, the second N, third W, and the fourth column CM.

               smoke = load('lab9.dat');
               T = smoke(:,1);
               N = smoke(:,2);
               W = smoke(:,3);
               X = [ones(length(smoke),1) T N W ]; % X needs to be a
                                                   % matrix with a leading 
                                                   % column of ones.
               CM = smoke(:,4);
               Y = CM;
               g = 1; 
               k = 3;
               n = length(Y);

Let's investigate the the items above: