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.
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!
proc glm data=HalfFraction;
class power flow pressure gap;
model rate=power|flow|pressure|gap;
run;
1
PROC GLMDATA=HalfFraction;
2
class power flow pressure gap;
3
model rate=power|flow|pressure|gap;
4
RUN;
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!
data Coded; set HalfFraction;
power = -1*(power =0.80) + 1*(power =1.20);
flow = -1*(flow =4.50) + 1*(flow =550 );
pressure = -1*(pressure=125 ) + 1*(pressure=200 );
gap = -1*(gap =275 ) + 1*(gap =325 );
run;
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!
proc glm data=Coded;
model rate=power|flow|pressure|gap / solution aliasing;
run;
1
2
PROC GLM
3
DATA=Coded;
4
model rate=power|flow|pressure|gap / solution aliasing;
5
RUN;
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`.
Explanation : This block combines the `HalfFraction` and `OtherHalf` datasets to create a complete `FullRep` dataset representing the entire factorial experiment.
Copied!
data FullRep;
set HalfFraction OtherHalf;
run;
1
DATA FullRep;
2
SET HalfFraction OtherHalf;
3
RUN;
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!
proc glm data=FullRep;
class power flow pressure gap;
model rate=power|flow|pressure|gap;
run;
1
PROC GLMDATA=FullRep;
2
class power flow pressure gap;
3
model rate=power|flow|pressure|gap;
4
RUN;
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.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.