Published on :
Statistical CREATION_INTERNE

Example 11 for PROC GLM: Analysis of a Screening Design

This code is also available in: Deutsch Español Français
Awaiting validation
The code first defines a `HalfFraction` dataset representing a half-fraction of a 2^4 factorial design. `PROC GLM` is used to model the `rate` response variable based on the `power`, `flow`, `pressure`, and `gap` factors. Then, to study the aliasing structure, the factors are recoded to -1/1 values in a new `Coded` dataset. `PROC GLM` is run again on this coded data with the `aliasing` option to display the confounding relationships between effects. Subsequently, data from the other half of the experiment is defined in `OtherHalf`. Both halves are combined to create the complete `FullRep` dataset. Finally, `PROC GLM` is executed on this complete dataset to perform a full analysis of variance, without the confounding present in the fractional design.
Data Analysis

Type : CREATION_INTERNE


The data is created directly in the script via DATA steps with datalines. The `HalfFraction` and `OtherHalf` datasets are created this way, then combined to form `FullRep`.

1 Code Block
DATA STEP Data
Explanation :
This block creates the `HalfFraction` dataset by reading data directly via the `datalines` statement. It represents the first half of a factorial experiment.
Copied!
1DATA HalfFraction;
2 INPUT power flow pressure gap rate;
3 DATALINES;
40.8 4.5 125 275 550
50.8 4.5 200 325 650
60.8 550.0 125 325 642
70.8 550.0 200 275 601
81.2 4.5 125 325 749
91.2 4.5 200 275 1052
101.2 550.0 125 275 1075
111.2 550.0 200 325 729
12;
13RUN;
2 Code Block
PROC GLM
Explanation :
This block executes a general linear model analysis on the `HalfFraction` data. It declares the class variables and specifies a full factorial model (4th order interaction) for the `rate` response variable.
Copied!
1PROC GLM DATA=HalfFraction;
2 class power flow pressure gap;
3 model rate=power|flow|pressure|gap;
4RUN;
3 Code Block
DATA STEP Data
Explanation :
This block creates the `Coded` dataset from `HalfFraction`. It transforms the factor values into -1/+1 coding, which is standard for analyzing the aliasing structure in factorial designs.
Copied!
1DATA Coded; SET HalfFraction;
2 power = -1*(power =0.80) + 1*(power =1.20);
3 flow = -1*(flow =4.50) + 1*(flow =550 );
4 pressure = -1*(pressure=125 ) + 1*(pressure=200 );
5 gap = -1*(gap =275 ) + 1*(gap =325 );
6RUN;
4 Code Block
PROC GLM
Explanation :
This block re-executes the analysis on the coded data. The `solution` option requests the display of parameter estimates, and the `aliasing` option is used to examine the confounding (aliasing) structure of the experimental design.
Copied!
1 
2PROC GLM
3DATA=Coded;
4model rate=power|flow|pressure|gap / solution aliasing;
5RUN;
6 
5 Code Block
DATA STEP Data
Explanation :
This block creates the `OtherHalf` dataset with data from the second half of the factorial experiment, also using `datalines`.
Copied!
1DATA OtherHalf;
2 INPUT power flow pressure gap rate;
3 DATALINES;
40.8 4.5 125 325 669
50.8 4.5 200 275 604
60.8 550.0 125 275 633
70.8 550.0 200 325 635
81.2 4.5 125 275 1037
91.2 4.5 200 325 868
101.2 550.0 125 325 860
111.2 550.0 200 275 1063
12;
13RUN;
6 Code Block
DATA STEP Data
Explanation :
This block combines the `HalfFraction` and `OtherHalf` datasets to create a complete `FullRep` dataset representing the entire factorial experiment.
Copied!
1DATA FullRep;
2 SET HalfFraction OtherHalf;
3RUN;
7 Code Block
PROC GLM
Explanation :
This block performs the final analysis of variance on the complete experimental design (`FullRep`), allowing for unbiased estimation of main effects and interactions.
Copied!
1PROC GLM DATA=FullRep;
2 class power flow pressure gap;
3 model rate=power|flow|pressure|gap;
4RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : S A S S A M P L E L I B R A R Y