13.07.2015 Views

Download pdf guide - VSN International

Download pdf guide - VSN International

Download pdf guide - VSN International

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

68 6 Regression6.2 PracticalAn absorptiometer was used to measure the absorption of light passing throughsuspensions that contained different numbers of cells. It was intended to estimate thenumber of cells in future suspensions by the rapid light absorption method, so it wasdecided to fit a regression of cell counts on light absorption. The data are available in thespreadsheet file Absorb.gsh, where X is the absorptiometer reading and Y the cell count8(10 /ml). This example comes from Experimentation in Biology by Ridgman (1975,Blackie, Glasgow).Load the data into GenStat and fit a linear regression of cell count on absorptiometerreading.Produce a graphical display of the regression.Copy the FIT statement from the Input log, edit it to suppress the warnings about theleverages of the points, and run the command again. (Hint: use the NOMESSAGES optionof FIT.)6.3 Multiple linear regressionIn multiple linear regression you have several explanatory variables. You can fit these byspecifying a list of variates, rather than a single variate, as the parameter of the FITdirective. However, there is an extra problem, that you need to decide which ones areneeded in the model. So you need to be able to explore models, comparing alternativevariables or sets of variables, as well as to display and check the model that you finallyselect. Section 1.11 of the Guide to Regression, Nonlinear and Generalized LinearModels in GenStat shows how to do this using the Change Models menu. Below we showthe equivalent commands..We illustrate this approach with a short set of data from a production plant, on page352 of Applied Regression Analysis by Draper & Smith (1981, Wiley, New York).Information was collected over 17 months on variables possibly associated with waterusage: the average temperature, the amount of production, the number of operating daysand the number of employees. The data are available in the spreadsheet file Water.gsh.(So we can load them into GenStat using SPLOAD in the usual way.)Before you start to explore different regression models, it is best to use the TERMSdirective to define the maximal model, that is the most complicated model that you maywant to fit. GenStat can then define a common set of units for the regression (omittingany units that are have missing x- or y-values), and carry out some initial calculations tomake the process more efficient. Here we may want to include any of the variatesEmploy, Opdays, Product or Temp. So we set the parameter of TERMS (which definesthe maximal model) to list them all; see line 4. We then start by fitting just the constant(line 5).2 SPLOAD 'Water.gsh'Loading Spreadsheet FileCatalogue of file Water.gshSheet Type: vectorIndex Type Nval Name1 variate 17 Employ2 variate 17 Opdays3 variate 17 Product4 variate 17 Temp5 variate 17 Water

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!