From: Abdel-Haleem Hussein on 27 Jan 2010 15:47 Hi all, i am trying to analyze GxE interaction using AMMI and unbalance data, i found that CIMMYT has some SAS codes for this analysis. here is the code that i downloaded: options ps=5000 ls=78; FILENAMEBIPLOT 'EXAMPLE5.CGM'; GOPTIONS DEVICE=CGMMWWCGSFNAME=BIPLOTGSFMODE=REPLACE; /******************************************************************** * Programa para realizarAMMIutilizandolosdatoscompletos * * y obteniendo la medias ajustadascomoLatice en PROC MIXED * ********************************************************************/ data a; infile'C:\BIOMETRICS\AMMI\example5.dat'; input env $ rep block gen $ yld; cards; proc sort; by env gen; proc mixed data=a method=reml; by env; id rep block gen; classes gen rep block; model yld= rep gen; random block(rep); lsmeans gen ; make 'tests' out=test1 noprint; make 'lsmeans' out=ls1 noprint; make 'covparms' out=cov1 noprint; make 'classlevels' out=levels noprint; make 'fitting' out=ajustenoprint; make 'reml' out=itera noprint; run; data errorpon; set cov1; if covparm^='Residual' then delete; proc means noprint; var est ; output out=covmeans mean=mse n=nenv; data mse2; set covmeans; keep msenenv; data medias; set ls1; yld=_lsmean_; keep env gen yld ; data rep; set test1; if source= 'REP'; nrep=ndf+1; keep nrep; proc means data=rep noprint; var nrep; output out = nrepm mean=nrep; data degree; set test1; if source = 'GEN' ; dfe=ddf; keep dfe; proc means data=degree noprint; var dfe; output out = degreem sum=dfe; data stats; merge mse2 nrepmdegreem; drop _type_ _freq_; TITLE1 'Analisisdevarianzautilizandotodoslosdatos'; TITLE2 'seconsideracomobloquescompletos en GLM'; PROCGLM DATA=A ; CLASS ENV GEN; MODEL YLD = ENV GEN ENV*GEN/SS4; * Para obtenerlosresiduales para la interaccionGenotipoporAmbiente (GE); * Bastamodificarelmodelo para obtenerresidualesincluyendoelefectode genotipos (G+GE); PROCGLM DATA=MEDIAS NOPRINT; CLASS ENV GEN; MODEL YLD = ENV GEN / SS4 ; OUTPUT OUT=OUTRES R=RESID; PROC SORT DATA=OUTRES; BY GEN ENV; PROC TRANSPOSE DATA=OUTRES OUT=OUTRES2; BY GEN; ID ENV; VAR RESID; * Descomposiciondel Valor Singular en IML para calcularelAMMI; PROCIML; USE OUTRES2; READ ALL INTO RESID; NGEN=NROW(RESID); NENV=NCOL(RESID); USE STATS; READ VAR {MSE} INTO MSEM; READ VAR {DFE} INTO DFEM; READ VAR {NREP} INTO NREP; CALL SVD (U,L,V,RESID); * SVD para la matrizderesiduales; MINIMO=MIN(NGEN,NENV); L=L[1:MINIMO,]; SS=(L##2)*NREP; * SumasdeCuadrados para losterminosAMMI; SUMA=SUM(SS); PORCENT=((1/SUMA)#SS)*100; * Calculodeproporciondavariabiliad y ; MINIMO=MIN(NGEN,NENV); * gradosdelibertad para cadaterminoAMMI; PORCENTA=0; DO I = 1 TO MINIMO; DF=(NGEN-1)+(NENV-1)-(2*I-1); DFA=DFA//DF; PORCEACU=PORCENT[I,]; PORCENTA=PORCENTA+PORCEACU; PORCENAC=PORCENAC//PORCENTA; END; DFE=J(MINIMO,1,DFEM); MSE=J(MINIMO,1,MSEM); SSDF=SS||PORCENT||PORCENAC||DFA||DFE||MSE; L12=L##0.5; * Obtenciondelos scores para genotipos y ; * ambientesusandoraizcuadradade lambda ; SCOREG1=U[,1]#L12[1,]; SCOREG2=U[,2]#L12[2,]; SCOREG3=U[,3]#L12[3,]; SCOREE1=V[,1]#L12[1,]; SCOREE2=V[,2]#L12[2,]; SCOREE3=V[,3]#L12[3,]; SCOREG=SCOREG1||SCOREG2||SCOREG3; SCOREE=SCOREE1||SCOREE2||SCOREE3; SCORES=SCOREG//SCOREE; CREATE SUMAS FROM SSDF; * Creaciondearchivos para utilizarlos ; APPEND FROM SSDF; * posteriormente en la pruebadeGollob ; CLOSE SUMAS; * y en elBiplot ; CREATE SCORES FROM SCORES; APPEND FROM SCORES ; CLOSE SCORES; * TerminaIML, continua Data Step deSAS; * Se prueba la significanciadecadaterminoAMMI, pruebadeGollob; DATA SSAMMI; SET SUMAS; SSAMMI =COL1; PORCENT =COL2; PORCENAC=COL3; DFAMMI =COL4; DFE =COL5; MSE =COL6; DROP COL1 - COL6; MSAMMI=SSAMMI/DFAMMI; F_AMMI=MSAMMI/MSE; PROBF=1-PROBF(F_AMMI,DFAMMI,DFE); TITLE1 'Resultadosdelassumasdecuadrados para losterminosAMMI'; PROC PRINT DATA=SSAMMINOOBS; * VAR SSAMMIPORCENTPORCENACDFAMMIMSAMMI F_AMMIPROBF; * Iniciageneraciondeinformacion para elBiplot; * Para obtenerlas variables Type y Name para losgenotipos; PROC SORT DATA=A; BY GEN; PROC MEANS DATA=A NOPRINT; BY GEN ; VAR YLD; OUTPUT OUT = MEDIAG MEAN=YLD; DATA NAMEG; SET MEDIAG; TYPE = 'GEN'; NAME = GEN; KEEP TYPE NAME YLD; * Para obtenerlas variables Type y Name para losambientes; PROC SORT DATA=A; BY ENV; PROC MEANS DATA=A NOPRINT; BY ENV ; VAR YLD; OUTPUT OUT = MEDIAE MEAN=YLD; DATA NAMEE; SET MEDIAE; TYPE = 'ENV'; NAME = COMPRESS('S'||ENV); KEEP TYPE NAME YLD; DATA NAMETYPE; * Contiene Type y Name para genotipos y ambientes; SET NAMEGNAMEE; * Se genera archivoconteniendo Type, Name y Scores para elBiplot; DATA BIPLOT ; MERGE NAMETYPE SCORES; DIM1=COL1; DIM2=COL2; DIM3=COL3; DROP COL1-COL3; TITLE1 'Resultadosdelos scores para la graficaciondelBiplot'; PROC PRINT DATA=BIPLOTNOOBS; VAR TYPE NAME YLD DIM1 DIM2 DIM3; * Generaciondearchivotipo Annotate para elBiplot; Data labels; set biplot; retain xsys '2' ysys '2' ; length function text $8 ; text = name ; if type = 'GEN' then do; color='black '; size = 0.6; style = 'hwcgm001'; x = dim1; y = dim2; if dim1 >=0 then position='5'; else position='5'; function = 'LABEL'; output; end; if type = 'ENV' then DO; color='black '; size = 0.6; style = 'hwcgm001'; x = 0.0; y = 0.0; function='MOVE'; output; x = dim1; y = dim2; function='DRAW' ; output; if dim1 >=0 then position='5'; else position='5'; function='LABEL'; output; end; Procgplot data=biplot; Plot dim2*dim1 / Annotate=labels frame Vref=0.0 Href = 0.0 cvref=black chref=black lvref=3 lhref=3 vaxis=axis2 haxis=axis1 vminor=1 hminor=1 nolegend; symbol1 v=none c=black h=0.7 ; symbol2 v=none c=black h=0.7 ; axis2 length = 6.0 in order = (-2.0 to 2.0 by 0.4) label=(f=hwcgm001 h=1.2 a=90 r=0 'Factor 2') value=(h=0.8) minor=none; axis1 length = 6.0 in order = (-2.0 to 2.0 by 0.4) label=(f=hwcgm001 h=1.2 'Factor 1') value=(h=0.8) minor=none; Title1 f=hwcgm001 h=1.0 'AMMIbiplot for Example 5, using Mixed Models'; run; /*********************************************************************************/ /********************************************************************************/ /*********************************************************************************/ /********************************************************************************/ /*********************************************************************************/ /********************************************************************************/ every time i am running it, found that only glm is working not mixed nor biplot!!!!!!!!!. here is the SAS log: WARNING: Units were not specified on the LEFTMARGIN option. Inches will be used. WARNING: Units were not specified on the TOPMARGIN option. Inches will be used. WARNING: Units were not specified on the RIGHTMARGIN option. Inches will be used. WARNING: Units were not specified on the BOTTOMMARGIN option. Inches will be used. NOTE: SAS initialization used: real time 9.75 seconds cpu time 0.98 seconds 1 options ps=5000 ls=78; 2 3 FILENAMEBIPLOT 'EXAMPLE5.CGM'; 4 GOPTIONS DEVICE=CGMMWWCGSFNAME=BIPLOTGSFMODE=REPLACE; 5 6 7 /******************************************************************** 8 * Programa para realizarAMMIutilizandolosdatoscompletos * 9 * y obteniendo la medias ajustadascomoLatice en PROC MIXED * 10 ********************************************************************/ 11 12 data a; 13 infile'C:\BIOMETRICS\AMMI\example5.dat'; 14 input env $ rep block gen $ yld; 15 cards; NOTE: The infile 'C:\BIOMETRICS\AMMI\example5.dat' is: File Name=C:\BIOMETRICS\AMMI\example5.dat, RECFM=V,LRECL=256 NOTE: 540 records were read from the infile 'C:\BIOMETRICS\AMMI\example5.dat'. The minimum record length was 35. The maximum record length was 36. NOTE: The data set WORK.A has 540 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.26 seconds cpu time 0.03 seconds 17 proc sort; 18 by env gen; 19 NOTE: There were 540 observations read from the data set WORK.A. NOTE: The data set WORK.A has 540 observations and 5 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.26 seconds cpu time 0.04 seconds 20 proc mixed data=a method=reml; 21 by env; 22 id rep block gen; 23 classes gen rep block; NOTE: PROCEDURE MIXED used (Total process time): real time 0.18 seconds cpu time 0.01 seconds NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.TEST1 may be incomplete. When this step was stopped there were 0 observations and 0 variables. 24 model yld= rep gen; 25 random block(rep); 26 lsmeans gen ; 27 make 'tests' out=test1 noprint; -------- 22 200 ERROR 22-322: Syntax error, expecting one of the following: ;, (. ERROR 200-322: The symbol is not recognized and will be ignored. 28 make 'lsmeans' out=ls1 noprint; 29 make 'covparms' out=cov1 noprint; 30 31 make 'classlevels' out=levels noprint; 32 make 'fitting' out=ajustenoprint; 33 make 'reml' out=itera noprint; 34 35 run; 36 37 38 data errorpon; 39 set cov1; ERROR: File WORK.COV1.DATA does not exist. 40 if covparm^='Residual' then delete; NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.ERRORPON may be incomplete. When this step was stopped there were 0 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 41 proc means noprint; 42 var est ; ERROR: Variable EST not found. 43 output out=covmeans 44 mean=mse 45 n=nenv; NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.COVMEANS may be incomplete. When this step was stopped there were 0 observations and 0 variables. NOTE: PROCEDURE MEANS used (Total process time): real time 0.07 seconds cpu time 0.02 seconds 46 data mse2; 47 set covmeans; 48 keep msenenv; 49 50 WARNING: The variable mse in the DROP, KEEP, or RENAME list has never been referenced. WARNING: The variable nenv in the DROP, KEEP, or RENAME list has never been referenced. NOTE: There were 0 observations read from the data set WORK.COVMEANS. NOTE: The data set WORK.MSE2 has 0 observations and 0 variables. NOTE: DATA statement used (Total process time): real time 0.04 seconds cpu time 0.01 seconds 51 data medias; 52 set ls1; ERROR: File WORK.LS1.DATA does not exist. 53 yld=_lsmean_; 54 keep env gen yld ; 55 WARNING: The variable env in the DROP, KEEP, or RENAME list has never been referenced. WARNING: The variable gen in the DROP, KEEP, or RENAME list has never been referenced. NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.MEDIAS may be incomplete. When this step was stopped there were 0 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 56 data rep; 57 set test1; 58 if source= 'REP'; 59 nrep=ndf+1; 60 keep nrep; NOTE: Variable source is uninitialized. NOTE: Variable ndf is uninitialized. NOTE: There were 0 observations read from the data set WORK.TEST1. NOTE: The data set WORK.REP has 0 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.05 seconds cpu time 0.01 seconds 61 proc means data=rep noprint; 62 var nrep; 63 output out = nrepm mean=nrep; 64 NOTE: No observations in data set WORK.REP. NOTE: The data set WORK.NREPM has 0 observations and 3 variables. NOTE: PROCEDURE MEANS used (Total process time): real time 0.01 seconds cpu time 0.00 seconds 65 data degree; 66 set test1; 67 if source = 'GEN' ; 68 dfe=ddf; 69 keep dfe; NOTE: Variable source is uninitialized. NOTE: Variable ddf is uninitialized. NOTE: There were 0 observations read from the data set WORK.TEST1. NOTE: The data set WORK.DEGREE has 0 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 70 proc means data=degree noprint; 71 var dfe; 72 output out = degreem sum=dfe; 73 NOTE: No observations in data set WORK.DEGREE. NOTE: The data set WORK.DEGREEM has 0 observations and 3 variables. NOTE: PROCEDURE MEANS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 74 data stats; 75 merge mse2 nrepmdegreem; 76 drop _type_ _freq_; 77 78 79 TITLE1 'Analisisdevarianzautilizandotodoslosdatos'; 80 TITLE2 'seconsideracomobloquescompletos en GLM'; 81 NOTE: There were 0 observations read from the data set WORK.MSE2. NOTE: There were 0 observations read from the data set WORK.NREPM. NOTE: There were 0 observations read from the data set WORK.DEGREEM. NOTE: The data set WORK.STATS has 0 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 82 PROCGLM DATA=A ; 83 CLASS ENV GEN; 84 MODEL YLD = ENV GEN ENV*GEN/SS4; 85 86 87 * Para obtenerlosresiduales para la interaccionGenotipoporAmbiente 87 ! (GE); 88 * Bastamodificarelmodelo para obtenerresidualesincluyendoelefecto 88 ! de 89 genotipos (G+GE); 90 NOTE: PROCEDURE GLM used (Total process time): real time 0.59 seconds cpu time 0.17 seconds 91 PROCGLM DATA=MEDIAS NOPRINT; 92 CLASS ENV GEN; ERROR: Variable ENV not found. ERROR: Variable GEN not found. NOTE: The previous statement has been deleted. 93 MODEL YLD = ENV GEN / SS4 ; ERROR: Variable ENV not found. NOTE: The previous statement has been deleted. 94 OUTPUT OUT=OUTRES R=RESID; 95 ERROR: A MODEL statement must be given. NOTE: The data set WORK.OUTRES has 0 observations and 0 variables. NOTE: PROCEDURE GLM used (Total process time): real time 0.02 seconds cpu time 0.01 seconds 96 PROC SORT DATA=OUTRES; 97 BY GEN ENV; ERROR: Variable GEN not found. ERROR: Variable ENV not found. 98 NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SORT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 99 PROC TRANSPOSE DATA=OUTRES OUT=OUTRES2; 100 BY GEN; ERROR: Variable GEN not found. 101 ID ENV; 102 VAR RESID; 103 104 * Descomposiciondel Valor Singular en IML para calcularelAMMI; 105 NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.OUTRES2 may be incomplete. When this step was stopped there were 0 observations and 0 variables. NOTE: PROCEDURE TRANSPOSE used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 106 PROCIML; NOTE: IML Ready 107 108 USE OUTRES2; WARNING: Data set WORK.OUTRES2 is empty. statement : USE at line 108 column 1 109 READ ALL INTO RESID; WARNING: End of File reached. statement : READ at line 109 column 1 110 NGEN=NROW(RESID); 111 NENV=NCOL(RESID); 112 113 USE STATS; WARNING: Data set WORK.STATS is empty. statement : USE at line 113 column 1 114 READ VAR {MSE} INTO MSEM; WARNING: End of File reached. statement : READ at line 114 column 1 115 READ VAR {DFE} INTO DFEM; WARNING: End of File reached. statement : READ at line 115 column 1 116 READ VAR {NREP} INTO NREP; WARNING: End of File reached. statement : READ at line 116 column 1 117 118 CALL SVD (U,L,V,RESID); ERROR: (execution) Matrix has not been set to a value. operation : SVD at line 118 column 1 operands : RESID RESID 0 row 0 col (type ?, size 0) statement : CALL at line 118 column 1 118! * SVD para la matrizderesiduales; 119 MINIMO=MIN(NGEN,NENV); 120 L=L[1:MINIMO,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 120 column 4 operands : L, *LIT1004, MINIMO, L 0 row 0 col (type ?, size 0) *LIT1004 1 row 1 col (numeric) 1 MINIMO 1 row 1 col (numeric) 0 statement : ASSIGN at line 120 column 1 121 122 SS=(L##2)*NREP; ERROR: (execution) Matrix has not been set to a value. operation : ## at line 122 column 1 operands : L, *LIT1005 L 0 row 0 col (type ?, size 0) *LIT1005 1 row 1 col (numeric) 2 statement : ASSIGN at line 122 column 1 122! * SumasdeCuadrados para los 122! terminosAMMI; 123 124 SUMA=SUM(SS); ERROR: (execution) Matrix has not been set to a value. operation : SUM at line 124 column 9 operands : SS SS 0 row 0 col (type ?, size 0) statement : ASSIGN at line 124 column 1 125 PORCENT=((1/SUMA)#SS)*100; ERROR: (execution) Matrix has not been set to a value. operation : / at line 125 column 12 operands : *LIT1006, SUMA *LIT1006 1 row 1 col (numeric) 1 SUMA 0 row 0 col (type ?, size 0) statement : ASSIGN at line 125 column 1 125! * Calculodeproporcionda 125! variabiliad y ; 126 MINIMO=MIN(NGEN,NENV); 126! * gradosdelibertad para cada 126! terminoAMMI; 127 PORCENTA=0; 128 DO I = 1 TO MINIMO; 129 DF=(NGEN-1)+(NENV-1)-(2*I-1); 130 DFA=DFA//DF; 131 PORCEACU=PORCENT[I,]; 132 PORCENTA=PORCENTA+PORCEACU; 133 PORCENAC=PORCENAC//PORCENTA; 134 END; 135 136 DFE=J(MINIMO,1,DFEM); ERROR: (execution) Matrix has not been set to a value. operation : J at line 136 column 6 operands : MINIMO, *LIT1014, DFEM MINIMO 1 row 1 col (numeric) 0 *LIT1014 1 row 1 col (numeric) 1 DFEM 0 row 0 col (type ?, size 0) statement : ASSIGN at line 136 column 1 137 MSE=J(MINIMO,1,MSEM); ERROR: (execution) Matrix has not been set to a value. operation : J at line 137 column 6 operands : MINIMO, *LIT1015, MSEM MINIMO 1 row 1 col (numeric) 0 *LIT1015 1 row 1 col (numeric) 1 MSEM 0 row 0 col (type ?, size 0) statement : ASSIGN at line 137 column 1 138 SSDF=SS||PORCENT||PORCENAC||DFA||DFE||MSE; ERROR: (execution) Matrix has not been set to a value. operation : || at line 138 column 8 operands : SS, PORCENT SS 0 row 0 col (type ?, size 0) PORCENT 0 row 0 col (type ?, size 0) statement : ASSIGN at line 138 column 1 139 140 L12=L##0.5; ERROR: (execution) Matrix has not been set to a value. operation : ## at line 140 column 1 operands : L, *LIT1016 L 0 row 0 col (type ?, size 0) *LIT1016 1 row 1 col (numeric) 0.5 statement : ASSIGN at line 140 column 1 140! * Obtenciondelos scores para 140! genotipos y ; 141 * ambientesusandoraizcuadradade 141! lambda ; 142 SCOREG1=U[,1]#L12[1,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 142 column 10 operands : U, , *LIT1017 U 0 row 0 col (type ?, size 0) *LIT1017 1 row 1 col (numeric) 1 statement : ASSIGN at line 142 column 1 143 SCOREG2=U[,2]#L12[2,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 143 column 10 operands : U, , *LIT1019 U 0 row 0 col (type ?, size 0) *LIT1019 1 row 1 col (numeric) 2 statement : ASSIGN at line 143 column 1 144 SCOREG3=U[,3]#L12[3,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 144 column 10 operands : U, , *LIT1021 U 0 row 0 col (type ?, size 0) *LIT1021 1 row 1 col (numeric) 3 statement : ASSIGN at line 144 column 1 145 SCOREE1=V[,1]#L12[1,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 145 column 10 operands : V, , *LIT1023 V 0 row 0 col (type ?, size 0) *LIT1023 1 row 1 col (numeric) 1 statement : ASSIGN at line 145 column 1 146 SCOREE2=V[,2]#L12[2,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 146 column 10 operands : V, , *LIT1025 V 0 row 0 col (type ?, size 0) *LIT1025 1 row 1 col (numeric) 2 statement : ASSIGN at line 146 column 1 147 SCOREE3=V[,3]#L12[3,]; ERROR: (execution) Matrix has not been set to a value. operation : [ at line 147 column 10 operands : V, , *LIT1027 V 0 row 0 col (type ?, size 0) *LIT1027 1 row 1 col (numeric) 3 statement : ASSIGN at line 147 column 1 148 149 SCOREG=SCOREG1||SCOREG2||SCOREG3; ERROR: (execution) Matrix has not been set to a value. operation : || at line 149 column 15 operands : SCOREG1, SCOREG2 SCOREG1 0 row 0 col (type ?, size 0) SCOREG2 0 row 0 col (type ?, size 0) statement : ASSIGN at line 149 column 1 150 SCOREE=SCOREE1||SCOREE2||SCOREE3; ERROR: (execution) Matrix has not been set to a value. operation : || at line 150 column 15 operands : SCOREE1, SCOREE2 SCOREE1 0 row 0 col (type ?, size 0) SCOREE2 0 row 0 col (type ?, size 0) statement : ASSIGN at line 150 column 1 151 SCORES=SCOREG//SCOREE; ERROR: (execution) Matrix has not been set to a value. operation : // at line 151 column 14 operands : SCOREG, SCOREE SCOREG 0 row 0 col (type ?, size 0) SCOREE 0 row 0 col (type ?, size 0) statement : ASSIGN at line 151 column 1 152 153 154 CREATE SUMAS FROM SSDF; ERROR: Matrix SSDF has not been set to a value. statement : CREATE at line 154 column 1 154! * Creaciondearchivos para 154! utilizarlos ; 155 APPEND FROM SSDF; ERROR: No data set is currently open for output. statement : APPEND at line 155 column 1 155! * posteriormente en la pruebade 155! Gollob ; 156 CLOSE SUMAS; NOTE: Cannot close WORK.SUMAS; it is not open. 156! * y en elBiplot 156! ; 157 158 CREATE SCORES FROM SCORES; ERROR: Matrix SCORES has not been set to a value. statement : CREATE at line 158 column 1 159 APPEND FROM SCORES ; ERROR: No data set is currently open for output. statement : APPEND at line 159 column 1 160 CLOSE SCORES; NOTE: Cannot close WORK.SCORES; it is not open. 161 162 * TerminaIML, continua Data Step deSAS; 163 164 * Se prueba la significanciadecadaterminoAMMI, pruebadeGollob; 165 NOTE: Exiting IML. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE IML used (Total process time): real time 0.10 seconds cpu time 0.02 seconds 166 DATA SSAMMI; 167 SET SUMAS; ERROR: File WORK.SUMAS.DATA does not exist. 168 SSAMMI =COL1; 169 PORCENT =COL2; 170 PORCENAC=COL3; 171 DFAMMI =COL4; 172 DFE =COL5; 173 MSE =COL6; 174 DROP COL1 - COL6; 175 MSAMMI=SSAMMI/DFAMMI; 176 F_AMMI=MSAMMI/MSE; 177 PROBF=1-PROBF(F_AMMI,DFAMMI,DFE); 178 179 TITLE1 'Resultadosdelassumasdecuadrados para losterminosAMMI'; NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.SSAMMI may be incomplete. When this step was stopped there were 0 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 180 PROC PRINT DATA=SSAMMINOOBS; 181 * VAR SSAMMIPORCENTPORCENACDFAMMIMSAMMI F_AMMIPROBF; 182 183 184 * Iniciageneraciondeinformacion para elBiplot; 185 186 * Para obtenerlas variables Type y Name para losgenotipos; 187 NOTE: No observations in data set WORK.SSAMMI. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.01 seconds 188 PROC SORT DATA=A; 189 BY GEN; NOTE: There were 540 observations read from the data set WORK.A. NOTE: The data set WORK.A has 540 observations and 5 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 190 PROC MEANS DATA=A NOPRINT; 191 BY GEN ; 192 VAR YLD; 193 OUTPUT OUT = MEDIAG MEAN=YLD; NOTE: There were 540 observations read from the data set WORK.A. NOTE: The data set WORK.MEDIAG has 18 observations and 4 variables. NOTE: PROCEDURE MEANS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 194 DATA NAMEG; 195 SET MEDIAG; 196 TYPE = 'GEN'; 197 NAME = GEN; 198 KEEP TYPE NAME YLD; 199 200 201 * Para obtenerlas variables Type y Name para losambientes; 202 NOTE: There were 18 observations read from the data set WORK.MEDIAG. NOTE: The data set WORK.NAMEG has 18 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 203 PROC SORT DATA=A; 204 BY ENV; NOTE: There were 540 observations read from the data set WORK.A. NOTE: The data set WORK.A has 540 observations and 5 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.06 seconds cpu time 0.03 seconds 205 PROC MEANS DATA=A NOPRINT; 206 BY ENV ; 207 VAR YLD; 208 OUTPUT OUT = MEDIAE MEAN=YLD; NOTE: There were 540 observations read from the data set WORK.A. NOTE: The data set WORK.MEDIAE has 10 observations and 4 variables. NOTE: PROCEDURE MEANS used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 209 DATA NAMEE; 210 SET MEDIAE; 211 TYPE = 'ENV'; 212 NAME = COMPRESS('S'||ENV); 213 KEEP TYPE NAME YLD; 214 215 NOTE: There were 10 observations read from the data set WORK.MEDIAE. NOTE: The data set WORK.NAMEE has 10 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 216 DATA NAMETYPE; * Contiene Type y Name para genotipos y 216! ambientes; 217 SET NAMEGNAMEE; 218 219 220 * Se genera archivoconteniendo Type, Name y Scores para elBiplot; 221 NOTE: There were 18 observations read from the data set WORK.NAMEG. NOTE: There were 10 observations read from the data set WORK.NAMEE. NOTE: The data set WORK.NAMETYPE has 28 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 222 DATA BIPLOT ; 223 MERGE NAMETYPE SCORES; ERROR: File WORK.SCORES.DATA does not exist. 224 DIM1=COL1; 225 DIM2=COL2; 226 DIM3=COL3; 227 DROP COL1-COL3; 228 229 TITLE1 'Resultados de los scores para la graficacion del Biplot'; NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.BIPLOT may be incomplete. When this step was stopped there were 0 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 230 PROC PRINT DATA=BIPLOT NOOBS; 231 VAR TYPE NAME YLD DIM1 DIM2 DIM3; 232 233 * Generacion de archivo tipo Annotate para el Biplot; 234 NOTE: No observations in data set WORK.BIPLOT. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 235 Data labels; 236 set biplot; 237 retain xsys '2' ysys '2' ; 238 length function text $8 ; 239 text = name ; 240 241 if type = 'GEN' then do; 242 color='black '; 243 size = 0.6; 244 style = 'hwcgm001'; 245 x = dim1; 246 y = dim2; 247 if dim1 >=0 248 then position='5'; 249 else position='5'; 250 function = 'LABEL'; 251 output; 252 end; 253 254 if type = 'ENV' then DO; 255 color='black '; 256 size = 0.6; 257 style = 'hwcgm001'; 258 x = 0.0; 259 y = 0.0; 260 function='MOVE'; 261 output; 262 x = dim1; 263 y = dim2; 264 function='DRAW' ; 265 output; 266 if dim1 >=0 267 then position='5'; 268 else position='5'; 269 function='LABEL'; 270 output; 271 end; 272 273 NOTE: There were 0 observations read from the data set WORK.BIPLOT. NOTE: The data set WORK.LABELS has 0 observations and 16 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 274 Proc gplot data=biplot; 275 276 Plot dim2*dim1 / Annotate=labels frame 277 Vref=0.0 Href = 0.0 278 cvref=black chref=black 279 lvref=3 lhref=3 280 vaxis=axis2 haxis=axis1 281 vminor=1 hminor=1 nolegend; 282 283 symbol1 v=none c=black h=0.7 ; 284 symbol2 v=none c=black h=0.7 ; 285 286 axis2 287 length = 6.0 in 288 order = (-2.0 to 2.0 by 0.4) 289 label=(f=hwcgm001 h=1.2 a=90 r=0 'Factor 2') 290 value=(h=0.8) 291 minor=none; 292 293 axis1 294 length = 6.0 in 295 order = (-2.0 to 2.0 by 0.4) 296 label=(f=hwcgm001 h=1.2 'Factor 1') 297 value=(h=0.8) 298 minor=none; 299 300 301 Title1 f=hwcgm001 h=1.0 'AMMI biplot for Example 5, using Mixed Models'; 302 303 run; NOTE: No observations in data set WORK.BIPLOT. /*********************************************************************************/ /********************************************************************************/ /*********************************************************************************/ /********************************************************************************/ /*********************************************************************************/ /********************************************************************************/ i am not SAS guy, but found that make statment is not in use in SAS 9.1 that i am using. so tried to change them into ods>>>>> make 'fitting' out=ajuste noprint; into ods listing exclude FitStatistics; ods output FitStatistics=ajuste; but still the program is not able to reconize test1 and itera data. Please any help from your side is appreciated. I did not attach any filed, Since i do not know if attaching files is appropriate, but I have them if you like. thanks so much hussein
|
Pages: 1 Prev: Importing Excel into SAS and the MIXED= option Next: Running SAS in batch under Windows XP. |