The script begins by creating a dataset named 'diallel'. It simulates flowering time data for crosses between 8 different parental lines, distributed in two blocks. A particular feature is the creation of a 'sym' variable to identify reciprocal crosses. Then, the `PROC GLIMMIX` procedure is used to fit a statistical model. The model defines 'block' as a fixed effect and several random effects, notably a multi-member 'line' effect constructed from parents 'p' and 'm' using the `EFFECT` statement. Finally, PROC PRINT is used to display a portion of the random effects design matrix generated by GLIMMIX.
Data Analysis
Type : CREATION_INTERNE
The data is entirely generated in the first DATA step. A `do` loop structures the crosses, and the `INPUT` statement reads flowering time values directly from the `datalines` integrated into the code.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block constructs the 'diallel' table. It uses nested loops to generate all combinations of crosses between 8 parents ('p' and 'm'). Data for the 'time' variable is read from internal data lines (datalines) using the ' @@' indicator to read multiple observations on the same line.
Explanation : This block uses the GLIMMIX procedure for statistical analysis. 'class' defines classification variables. The `effect line = mm(p m)` statement creates a multi-member 'line' effect from variables 'p' and 'm'. The model is defined with 'time' as the dependent variable, 'block' as a fixed effect, and 'line', 'sym', 'p', 'm', and their interaction 'p*m' as random effects. The `outdesign(z)=zmat` option saves the random effects design matrix to a 'zmat' table.
Copied!
proc glimmix data=diallel outdesign(z)=zmat;
class block sym p m;
effect line = mm(p m);
model time = block;
random line sym p m p*m;
run;
1
PROC GLIMMIXDATA=diallel outdesign(z)=zmat;
2
class block sym p m;
3
effect line = mm(p m);
4
model time = block;
5
random line sym p m p*m;
6
RUN;
3 Code Block
PROC PRINT
Explanation : This block displays the first 10 observations of the 'zmat' table (created by PROC GLIMMIX) where the 'block' variable is equal to 1. It prints the variables 'p', 'm', 'time', and the first 8 columns of the random effects design matrix (_z1 to _z8).
Copied!
proc print data=zmat(where=(block=1) obs=10);
var p m time _z1-_z8;
run;
1
2
PROC PRINT
3
DATA=zmat(where=(block=1) obs=10);
4
var p m time _z1-_z8;
5
RUN;
6
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.