GLM Syntax - Example 6: Response Surface Design and Lack of Fit

This example illustrates the specification for a 2-factor blocked response surface design. Two alternative Design specifications are shown; one using the @  and | (bar) operator shortcuts, the other with the terms of the response surface model explicitly written out. You can run this example with the example data file Composit.sta. Note that brief descriptive comments are enclosed in curly brackets. For a discussion of this data set and analyses, see also the example central composite (response surface) design described in the context of the Experimental Design module.

GLM;

{ Dependent variable: }

   DEPENDENT = YIELD;

{ Specification of grouping or blocking variable (factor); note that

   no codes (values) are specified, so the program will by default

   take all grouping codes found in the data file. }

   GROUPS = BLOCK;

{ The continuous predictor variables list: }

   COVARIATE = TIME DEGREES;

{ Here the bar operator is used to construct the full factorial

  design; the bar operator will evaluate the products of all terms that

   are "connected" by the operator. Because of the operator @2 only

   two-way product terms will be generated. }

   DESIGN = BLOCK + TIME | TIME | DEGREES | DEGREES @2;

{An alternative DESIGN specification without the use of the @ and | operators is:

   DESIGN = BLOCK +

            TIME + TIME*TIME +

            DEGREES + DEGREES*DEGREES +

            TIME*DEGREES; }

{ The next statement requests the computation of the pure error and

  lack-of-fit. }

   LACKOFFIT = YES;

{ The next statement "flags" the two continuous predictors as

   surface variables. }

   SURFACE = TIME DEGREES;

For more examples, see GLM Syntax Examples.