BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
venkkat
Fluorite | Level 6

hi, users, I Am using a SAS university edition I want to do the correlation analysis of genotype and phenotype for each trait I am using,

I used the script as follows 

*USE DATA FROM ONLY ONE ENVIRONMENT FOR THIS EXAMPLE!;
data sen3evr; set sen3evr; if env = 98;proc print;
*first, estimate variance components for each trait separately to compare to multivariate analysis below;
%macro varcomp(trait);
proc mixed data = work.sen3evr;
class rep  id;
model &trait = ;
random rep id;
*also check effect of setting reps fixed on other variance components;
proc mixed data = work.sen3evr;
class rep  id;
model &trait = rep;
random id;
run;
%mend;
%varcomp(vsp);
%varcomp(vsb);
%varcomp(pm);
%varcomp(cm);
%varcomp(pbvdif);
run;
*restructure data set for multivariate reml analysis;
data three; length trait $ 5; set sen3evr;
trait = "vsp"; y = vsp; output;
trait = "vsb"; y = vsb; output;
trait = "pm"; y = pm; output;
trait = "cm"; y = pm; output;
trait = "pbvdif"; y = pm; output;
drop vsp vsb pm cm pbvdif;
* analyze variables pair-wise;
%macro corr(trait1, trait2);
data traits; set three; if trait = "&trait1" or trait = "&trait2";
proc mixed asycov data = traits; 
class trait rep id;
model y = rep(trait);
random trait/subject = id type = un;
repeated trait/ sub = rep*id type = un;
ods output covparms = estmat; ods output asycov = covmat;
run;
proc iml;
use estmat; read all into e;
use covmat; read all into cov;
run;
* Note that SAS introduces an extra first column into the covariance matrix which must be removed;
C = cov(|1:nrow(cov), 2:ncol(cov)|);
* Obtain genotypic and phenotypic covariance and variance components;
CovG = e(|2,1|);
VG1 = e(|1,1|);
VG2 = e(|3,1|);
CovP = CovG + e(|5,1|);
VP1 = VG1 + e(|4,1|);
VP2 = VG2 + e(|6,1|);
* Create a module called "correl" that will estimate genotypic and phenotypic correlations 
and their standard errors;
start correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
RG = CovG/sqrt(VG1*VG2);
*Make the derivative vector for rg, note that the order of the rows and columns of the variance
covariance matrix is VG1, CovG, VG2, VError1, CovError, VError2;
dg = (-1/(2*VG1))//(1/CovG)//(-1/(2*VG2))//0//0//0;
varrg = (RG**2)*dg`*C*dg; serg = sqrt(varrg); 
RP = CovP/sqrt(VP1*VP2);
*Make the derivate vector for rp;
d1p = -1/(2*VP1);
d2p = 1/CovP;
d3p = -1/(2*VP2);
dp= d1p//d2p//d3p//d1p//d2p//d3p;
varrp = (RP**2)*dp`*C*dp; serp = sqrt(varrp); 
finish correl;
call correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
print "Genotypic Correlation Between &trait1 and &trait2";
print RG serg;
print "Phenotypic Correlation Between &trait1 and &trait2";
print RP serp;
quit; run;
%mend;
%corr(vsp,vsb);
%corr(vsp,pm);
%corr(vsp,cm);
%corr(vsp,pbvdif);
%corr(vsb,pm);
%corr(vsb,cm);
%corr(vsb,pbvdif);
%corr(pm,cm);
%corr(pm,pbvdif);
%corr(cm,pbvdif);
run;

I am getting the error as ods output was not created and the matrix has not set to value, the log file is as below.  I hope I have explained clearly, please help me out of this, I also used ods on ods off and ods listing.... still not working even in SAS Desktop version

 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 73         
 74         *USE DATA FROM ONLY ONE ENVIRONMENT FOR THIS EXAMPLE!;
 75         data sen3evr; set sen3evr; if env = 98;
 
 NOTE: There were 1200 observations read from the data set WORK.SEN3EVR.
 NOTE: The data set WORK.SEN3EVR has 1200 observations and 8 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.02 seconds
       
 
 75       !                                        proc print;
 76         *first, estimate variance components for each trait separately to compare to multivariate analysis below;
 77         %macro varcomp(trait);
 78         proc mixed data = work.sen3evr;
 79         class rep  id;
 80         model &trait = ;
 81         random rep id;
 82         *also check effect of setting reps fixed on other variance components;
 83         proc mixed data = work.sen3evr;
 84         class rep  id;
 85         model &trait = rep;
 86         random id;
 87         run;
 88         %mend;
 89         %varcomp(vsp);
 
 NOTE: There were 1200 observations read from the data set WORK.SEN3EVR.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           6.63 seconds
       cpu time            6.52 seconds
       
 
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           1.15 seconds
       cpu time            0.39 seconds
       
 
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.62 seconds
       cpu time            0.37 seconds
       
 
 90         %varcomp(vsb);
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: Estimated G matrix is not positive definite.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.32 seconds
       cpu time            0.33 seconds
       
 
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.38 seconds
       cpu time            0.35 seconds
       
 
 91         %varcomp(pm);
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.37 seconds
       
 
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.37 seconds
       cpu time            0.37 seconds
       
 
 92         %varcomp(cm);
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.42 seconds
       cpu time            0.42 seconds
       
 
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.36 seconds
       
 
 93         %varcomp(pbvdif);
 
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.37 seconds
       cpu time            0.35 seconds
       
 
 
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.38 seconds
       
 
 94         run;
 95         *restructure data set for multivariate reml analysis;
 96         data three; length trait $ 5; set sen3evr;
 97         trait = "vsp"; y = vsp; output;
 98         trait = "vsb"; y = vsb; output;
 99         trait = "pm"; y = pm; output;
 100        trait = "cm"; y = pm; output;
 101        trait = "pbvdif"; y = pm; output;
 102        drop vsp vsb pm cm pbvdif;
 103        * analyze variables pair-wise;
 104        %macro corr(trait1, trait2);
 105        data traits; set three; if trait = "&trait1" or trait = "&trait2";
 106        proc mixed asycov data = traits;
 107        class trait rep id;
 108        model y = rep(trait);
 109        random trait/subject = id type = un;
 110        repeated trait/ sub = rep*id type = un;
 111        ods output covparms = estmat; ods output asycov = covmat;
 112        run;
 113        proc iml;
 114        use estmat; read all into e;
 115        use covmat; read all into cov;
 116        run;
 117        * Note that SAS introduces an extra first column into the covariance matrix which must be removed;
 118        C = cov(|1:nrow(cov), 2:ncol(cov)|);
 119        * Obtain genotypic and phenotypic covariance and variance components;
 120        CovG = e(|2,1|);
 121        VG1 = e(|1,1|);
 122        VG2 = e(|3,1|);
 123        CovP = CovG + e(|5,1|);
 124        VP1 = VG1 + e(|4,1|);
 125        VP2 = VG2 + e(|6,1|);
 126        * Create a module called "correl" that will estimate genotypic and phenotypic correlations
 127        and their standard errors;
 128        start correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
 129        RG = CovG/sqrt(VG1*VG2);
 130        *Make the derivative vector for rg, note that the order of the rows and columns of the variance
 131        covariance matrix is VG1, CovG, VG2, VError1, CovError, VError2;
 132        dg = (-1/(2*VG1))//(1/CovG)//(-1/(2*VG2))//0//0//0;
 133        varrg = (RG**2)*dg`*C*dg; serg = sqrt(varrg);
 134        RP = CovP/sqrt(VP1*VP2);
 135        *Make the derivate vector for rp;
 136        d1p = -1/(2*VP1);
 137        d2p = 1/CovP;
 138        d3p = -1/(2*VP2);
 139        dp= d1p//d2p//d3p//d1p//d2p//d3p;
 140        varrp = (RP**2)*dp`*C*dp; serp = sqrt(varrp);
 141        finish correl;
 142        call correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
 143        print "Genotypic Correlation Between &trait1 and &trait2";
 144        print RG serg;
 145        print "Phenotypic Correlation Between &trait1 and &trait2";
 146        print RP serp;
 147        quit; run;
 148        %mend;
 149        %corr(vsp,vsb);
 
 NOTE: There were 1200 observations read from the data set WORK.SEN3EVR.
 NOTE: The data set WORK.THREE has 6000 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.02 seconds
       
 
 NOTE: 4 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.25 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 149 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 149 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 149 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 149 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 149 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 149 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 149 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 149 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 149 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 149 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 149 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 149 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 149 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 149 column 1
  traceback : module CORREL at line 149 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 149 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 149 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.21 seconds
       cpu time            0.03 seconds
       
 150        %corr(vsp,pm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.26 seconds
       cpu time            0.25 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 150 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 150 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 150 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 150 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 150 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 150 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 150 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 150 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 150 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 150 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 150 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 150 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 150 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 150 column 1
  traceback : module CORREL at line 150 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 150 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 150 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.04 seconds
       cpu time            0.04 seconds
       
 151        %corr(vsp,cm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.25 seconds
       cpu time            0.25 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 151 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 151 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 151 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 151 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 151 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 151 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 151 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 151 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 151 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 151 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 151 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 151 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 151 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 151 column 1
  traceback : module CORREL at line 151 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 151 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 151 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.02 seconds
       cpu time            0.03 seconds
       
 152        %corr(vsp,pbvdif);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.21 seconds
       cpu time            0.20 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 152 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 152 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 152 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 152 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 152 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 152 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 152 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 152 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 152 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 152 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 152 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 152 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 152 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 152 column 1
  traceback : module CORREL at line 152 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 152 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 152 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.03 seconds
       
 153        %corr(vsb,pm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.02 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.23 seconds
       cpu time            0.23 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 153 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 153 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 153 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 153 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 153 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 153 column 1
  traceback : module CORREL at line 153 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 153 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 153 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.02 seconds
       cpu time            0.02 seconds
       
 154        %corr(vsb,cm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.26 seconds
       cpu time            0.25 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 154 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 154 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 154 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 154 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 154 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 154 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 154 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 154 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 154 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 154 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 154 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 154 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 154 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 154 column 1
  traceback : module CORREL at line 154 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 154 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 154 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.04 seconds
       
 155        %corr(vsb,pbvdif);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.25 seconds
       cpu time            0.21 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 155 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 155 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 155 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 155 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 155 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 155 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 155 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 155 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 155 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 155 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 155 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 155 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 155 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 155 column 1
  traceback : module CORREL at line 155 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 155 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 155 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.03 seconds
       
 156        %corr(pm,cm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 218 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.27 seconds
       cpu time            0.24 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 156 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 156 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 156 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 156 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 156 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 156 column 1
  traceback : module CORREL at line 156 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 156 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 156 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.02 seconds
       cpu time            0.02 seconds
       
 157        %corr(pm,pbvdif);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.21 seconds
       cpu time            0.20 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 157 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 157 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 157 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 157 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 157 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 157 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 157 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 157 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 157 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 157 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 157 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 157 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 157 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 157 column 1
  traceback : module CORREL at line 157 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 157 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 157 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.03 seconds
       
 158        %corr(cm,pbvdif);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 WARNING: Output 'covparms' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.19 seconds
       cpu time            0.18 seconds
       
 
 NOTE: IML Ready
 ERROR: File WORK.ESTMAT.DATA does not exist.
 
  statement : USE at line 158 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 158 column 1
 ERROR: File WORK.COVMAT.DATA does not exist.
 
  statement : USE at line 158 column 1
 ERROR: No data set is currently open for input.
 
  statement : READ at line 158 column 1
 NOTE: Module MAIN is undefined in IML; cannot be RUN.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : cov, _TEM1002, *LIT1002, _TEM1003
 
 cov      0 row       0 col     (type ?, size 0)
 
 
 _TEM1002      1 row       2 cols    (numeric)
 
          1         0
 
 *LIT1002      1 row       1 col     (numeric)
 
          2
 
 _TEM1003      1 row       1 col     (numeric)
 
          0
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1003, *LIT1004
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1003      1 row       1 col     (numeric)
 
          2
 
 *LIT1004      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1005, *LIT1006
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1005      1 row       1 col     (numeric)
 
          1
 
 *LIT1006      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      0 row       0 col     (type ?, size 0)
 
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 158 column 1
  operands  : VG1, VG2
 
 VG1      0 row       0 col     (type ?, size 0)
 
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 158 column 1
  traceback : module CORREL at line 158 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 158 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 158 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.02 seconds
       cpu time            0.03 seconds
       
 159        run;
 160        
 161        
 162        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 174        
1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Welcome to SAS and to the Communities.

 

A mistake that new uers sometimes make is trying to embed code into a macro before it is completely debugged. A good development strategy is to use a macro only after the code is working well in all circumstances.

 

In this program, I think the source of your problem is the model does not fit the data, as evidenced by the NOTE

 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.

"Iteration 0" means that the procedure can't even begin the process of trying to solve for the parameter estimates. 

 

As stated in  Kiernan, Tao, and Gibbs (2012, p/. 10-11), this note appears because "PROC MIXED requires that you have one observation per repeated effect per subject. This note occurs when your point for that particular subject."

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

Welcome to SAS and to the Communities.

 

A mistake that new uers sometimes make is trying to embed code into a macro before it is completely debugged. A good development strategy is to use a macro only after the code is working well in all circumstances.

 

In this program, I think the source of your problem is the model does not fit the data, as evidenced by the NOTE

 NOTE: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Rep*ID 2 A441-5.

"Iteration 0" means that the procedure can't even begin the process of trying to solve for the parameter estimates. 

 

As stated in  Kiernan, Tao, and Gibbs (2012, p/. 10-11), this note appears because "PROC MIXED requires that you have one observation per repeated effect per subject. This note occurs when your point for that particular subject."

venkkat
Fluorite | Level 6

Thanks a lot Mr.Rick I appreciate you for the quick response which helped me and I have another error about the invalid subscript/subscript out of range. the sas code is as below and the log is 

 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 73         
 74         *USE DATA FROM ONLY ONE ENVIRONMENT FOR THIS EXAMPLE!;
 75         data evr3; set evr3; if env = 98;
 
 NOTE: There were 1200 observations read from the data set WORK.EVR3.
 NOTE: The data set WORK.EVR3 has 1200 observations and 8 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 75       !                                  proc print;
 76         *first, estimate variance components for each trait separately to compare to multivariate analysis below;
 77         %macro varcomp(trait);
 78         proc mixed data = work.evr3;
 79         class rep  id;
 80         model &trait = ;
 81         random rep id;
 82         *also check effect of setting reps fixed on other variance components;
 83         proc mixed data = work.evr3;
 84         class rep  id;
 85         model &trait = rep;
 86         random id;
 87         run;
 88         %mend;
 89         %varcomp(vsp);
 
 NOTE: There were 1200 observations read from the data set WORK.EVR3.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           6.23 seconds
       cpu time            6.20 seconds
       
 
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.39 seconds
       
 
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.37 seconds
       
 
 90         %varcomp(vsb);
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: Estimated G matrix is not positive definite.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.35 seconds
       cpu time            0.35 seconds
       
 
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.37 seconds
       cpu time            0.36 seconds
       
 
 91         %varcomp(pm);
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.42 seconds
       cpu time            0.41 seconds
       
 
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.41 seconds
       cpu time            0.42 seconds
       
 
 92         %varcomp(cm);
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.42 seconds
       cpu time            0.42 seconds
       
 
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.36 seconds
       cpu time            0.36 seconds
       
 
 93         %varcomp(pbvdif);
 
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.36 seconds
       cpu time            0.35 seconds
       
 
 
 NOTE: Convergence criteria met.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.34 seconds
       cpu time            0.34 seconds
       
 
 94         run;
 95         *restructure data set for multivariate reml analysis;
 96         data three; length trait $ 5; set evr3;
 97         trait = "vsp"; y = vsp; output;
 98         trait = "vsb"; y = vsb; output;
 99         trait = "pm"; y = pm; output;
 100        trait = "cm"; y = pm; output;
 101        trait = "pbvdif"; y = pm; output;
 102        drop vsp vsb pm cm pbvdif;
 103        * analyze variables pair-wise;
 104        %macro corr(trait1, trait2);
 105        data traits; set three; if trait = "&trait1" or trait = "&trait2";
 106        proc mixed asycov data = traits;
 107        class trait rep id;
 108        model y = rep(trait);
 109        random trait/subject = id type = un;
 110        repeated trait/ sub = rep*id type = un;
 111        ods output covparms = estmat; ods output asycov = covmat;
 112        run;
 113        proc iml;
 114        use estmat; read all into e;
 115        use covmat; read all into cov;
 116        * Note that SAS introduces an extra first column into the covariance matrix which must be removed;
 117        C = cov(|1:nrow(cov), 2:ncol(cov)|);
 118        * Obtain genotypic and phenotypic covariance and variance components;
 119        CovG = e(|2,1|);
 120        VG1 = e(|1,1|);
 121        VG2 = e(|3,1|);
 122        CovP = CovG + e(|5,1|);
 123        VP1 = VG1 + e(|4,1|);
 124        VP2 = VG2 + e(|6,1|);
 125        * Create a module called "correl" that will estimate genotypic and phenotypic correlations
 126        and their standard errors;
 127        start correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
 128        RG = CovG/sqrt(VG1*VG2);
 129        *Make the derivative vector for rg, note that the order of the rows and columns of the variance
 130        covariance matrix is VG1, CovG, VG2, VError1, CovError, VError2;
 131        dg = (-1/(2*VG1))//(1/CovG)//(-1/(2*VG2))//0//0//0;
 132        varrg = (RG**2)*dg`*C*dg; serg = sqrt(varrg);
 133        RP = CovP/sqrt(VP1*VP2);
 134        *Make the derivate vector for rp;
 135        d1p = -1/(2*VP1);
 136        d2p = 1/CovP;
 137        d3p = -1/(2*VP2);
 138        dp= d1p//d2p//d3p//d1p//d2p//d3p;
 139        varrp = (RP**2)*dp`*C*dp; serp = sqrt(varrp);
 140        finish correl;
 141        call correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
 142        print "Genotypic Correlation Between &trait1 and &trait2";
 143        print RG serg;
 144        print "Phenotypic Correlation Between &trait1 and &trait2";
 145        print RP serp;
 146        quit; run;
 147        %mend;
 148        
 149        
 150        %corr(vsp,vsb);
 
 NOTE: There were 1200 observations read from the data set WORK.EVR3.
 NOTE: The data set WORK.THREE has 6000 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 
 NOTE: 4 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 6 observations and 8 variables.
 NOTE: The data set WORK.ESTMAT has 6 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.61 seconds
       cpu time            0.61 seconds
       
 
 NOTE: IML Ready
 NOTE: Module CORREL defined.
 NOTE: Exiting IML.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.05 seconds
       cpu time            0.04 seconds
       
 
 151        %corr(vsp,pm);
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.02 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: Estimated G matrix is not positive definite.
 NOTE: The data set WORK.COVMAT has 6 observations and 8 variables.
 NOTE: The data set WORK.ESTMAT has 6 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.66 seconds
       cpu time            0.66 seconds
       
 
 NOTE: IML Ready
 NOTE: Module CORREL defined.
 NOTE: Exiting IML.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.06 seconds
       cpu time            0.06 seconds
       
 
 152        %corr(vsp,cm);
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: Estimated G matrix is not positive definite.
 NOTE: The data set WORK.COVMAT has 6 observations and 8 variables.
 NOTE: The data set WORK.ESTMAT has 6 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.66 seconds
       cpu time            0.65 seconds
       
 
 NOTE: IML Ready
 NOTE: Module CORREL defined.
 NOTE: Exiting IML.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.04 seconds
       cpu time            0.05 seconds
       
 
 153        %corr(vsp,pbvdif);
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 2 observations and 4 variables.
 NOTE: The data set WORK.ESTMAT has 2 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.37 seconds
       cpu time            0.37 seconds
       
 
 NOTE: IML Ready
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      2 rows      1 col     (numeric)
 
   1.127912
  0.5761443
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      2 rows      1 col     (numeric)
 
   1.127912
  0.5761443
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      2 rows      1 col     (numeric)
 
   1.127912
  0.5761443
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 153 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      2 rows      1 col     (numeric)
 
   1.127912
  0.5761443
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 153 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 153 column 1
  operands  : VG1, VG2
 
 VG1      1 row       1 col     (numeric)
 
   1.127912
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 153 column 1
  traceback : module CORREL at line 153 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 153 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 153 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.03 seconds
       
 154        %corr(vsb,pm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 6 observations and 8 variables.
 NOTE: The data set WORK.ESTMAT has 6 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.67 seconds
       cpu time            0.67 seconds
       
 
 NOTE: IML Ready
 NOTE: Module CORREL defined.
 NOTE: Exiting IML.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.04 seconds
       cpu time            0.05 seconds
       
 
 155        %corr(vsb,cm);
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 NOTE: 111 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 6 observations and 8 variables.
 NOTE: The data set WORK.ESTMAT has 6 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.69 seconds
       cpu time            0.67 seconds
       
 
 NOTE: IML Ready
 NOTE: Module CORREL defined.
 NOTE: Exiting IML.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.04 seconds
       cpu time            0.05 seconds
       
 
 156        %corr(vsb,pbvdif);
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 2 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 2 observations and 4 variables.
 NOTE: The data set WORK.ESTMAT has 2 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.36 seconds
       cpu time            0.35 seconds
       
 
 NOTE: IML Ready
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      2 rows      1 col     (numeric)
 
  0.5658762
  0.6261904
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      2 rows      1 col     (numeric)
 
  0.5658762
  0.6261904
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      2 rows      1 col     (numeric)
 
  0.5658762
  0.6261904
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 156 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      2 rows      1 col     (numeric)
 
  0.5658762
  0.6261904
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 156 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 156 column 1
  operands  : VG1, VG2
 
 VG1      1 row       1 col     (numeric)
 
  0.5658762
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 156 column 1
  traceback : module CORREL at line 156 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 156 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 156 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.03 seconds
       
 157        %corr(pm,cm);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 2400 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 NOTE: 218 observations are not included because of missing values.
 WARNING: Did not converge.
 NOTE: The data set WORK.ESTMAT has 6 observations and 3 variables.
 WARNING: Output 'asycov' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.38 seconds
       cpu time            0.37 seconds
       
 
 NOTE: IML Ready
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrices do not conform to the operation.
 
  operation : * at line 157 column 1
  operands  : _TEM1003, C
 
 _TEM1003      1 row       6 cols    (numeric)
 
   -0.02214 0.0442803  -0.02214         0         0         0
 
 C      2 rows      2 cols    (numeric)
 
  0.0031178 -0.000328
  -0.000328 0.0009848
 
  statement : ASSIGN at line 157 column 1
  traceback : module CORREL at line 157 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix SERG has not been set to a value.
 
  statement : PRINT at line 157 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 157 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.03 seconds
       cpu time            0.03 seconds
       
 158        %corr(pm,pbvdif);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.02 seconds
       
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 2 observations and 4 variables.
 NOTE: The data set WORK.ESTMAT has 2 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.36 seconds
       cpu time            0.35 seconds
       
 
 NOTE: IML Ready
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 158 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 158 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 158 column 1
  operands  : VG1, VG2
 
 VG1      1 row       1 col     (numeric)
 
  23.260417
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 158 column 1
  traceback : module CORREL at line 158 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 158 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 158 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.02 seconds
       cpu time            0.04 seconds
       
 159        %corr(cm,pbvdif);
 
 
 
 NOTE: There were 6000 observations read from the data set WORK.THREE.
 NOTE: The data set WORK.TRAITS has 1200 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 NOTE: 109 observations are not included because of missing values.
 NOTE: Convergence criteria met.
 NOTE: The data set WORK.COVMAT has 2 observations and 4 variables.
 NOTE: The data set WORK.ESTMAT has 2 observations and 3 variables.
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.39 seconds
       cpu time            0.37 seconds
       
 
 NOTE: IML Ready
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 159 column 1
  operands  : e, *LIT1007, *LIT1008
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1007      1 row       1 col     (numeric)
 
          3
 
 *LIT1008      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 159 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 159 column 1
  operands  : e, *LIT1009, *LIT1010
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1009      1 row       1 col     (numeric)
 
          5
 
 *LIT1010      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 159 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 159 column 1
  operands  : e, *LIT1011, *LIT1012
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1011      1 row       1 col     (numeric)
 
          4
 
 *LIT1012      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 159 column 1
 ERROR: (execution) Invalid subscript or subscript out of range.
 
  operation : (| at line 159 column 1
  operands  : e, *LIT1013, *LIT1014
 
 e      2 rows      1 col     (numeric)
 
  23.260417
  39.329231
 
 *LIT1013      1 row       1 col     (numeric)
 
          6
 
 *LIT1014      1 row       1 col     (numeric)
 
          1
 
  statement : ASSIGN at line 159 column 1
 NOTE: Module CORREL defined.
 ERROR: (execution) Matrix has not been set to a value.
 
  operation : * at line 159 column 1
  operands  : VG1, VG2
 
 VG1      1 row       1 col     (numeric)
 
  23.260417
 
 VG2      0 row       0 col     (type ?, size 0)
 
 
  statement : ASSIGN at line 159 column 1
  traceback : module CORREL at line 159 column 1
 
 NOTE: Paused in module CORREL.
 ERROR: Matrix RG has not been set to a value.
 
  statement : PRINT at line 159 column 1
 ERROR: Matrix RP has not been set to a value.
 
  statement : PRINT at line 159 column 1
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.02 seconds
       cpu time            0.03 seconds
       
 160        run;
 161        
 162        
 163        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 175        
script:- *USE DATA FROM ONLY ONE ENVIRONMENT FOR THIS EXAMPLE!;
data evr3; set evr3; if env = 98;proc print;
*first, estimate variance components for each trait separately to compare to multivariate analysis below;
%macro varcomp(trait);
proc mixed data = work.evr3;
class rep  id;
model &trait = ;
random rep id;
*also check effect of setting reps fixed on other variance components;
proc mixed data = work.evr3;
class rep  id;
model &trait = rep;
random id;
run;
%mend;
%varcomp(vsp);
%varcomp(vsb);
%varcomp(pm);
%varcomp(cm);
%varcomp(pbvdif);
run;
*restructure data set for multivariate reml analysis;
data three; length trait $ 5; set evr3;
trait = "vsp"; y = vsp; output;
trait = "vsb"; y = vsb; output;
trait = "pm"; y = pm; output;
trait = "cm"; y = pm; output;
trait = "pbvdif"; y = pm; output;
drop vsp vsb pm cm pbvdif;
* analyze variables pair-wise;
%macro corr(trait1, trait2);
data traits; set three; if trait = "&trait1" or trait = "&trait2";
proc mixed asycov data = traits; 
class trait rep id;
model y = rep(trait);
random trait/subject = id type = un;
repeated trait/ sub = rep*id type = un;
ods output covparms = estmat; ods output asycov = covmat;
run;
proc iml;
use estmat; read all into e;
use covmat; read all into cov;
* Note that SAS introduces an extra first column into the covariance matrix which must be removed;
C = cov(|1:nrow(cov), 2:ncol(cov)|);
* Obtain genotypic and phenotypic covariance and variance components;
CovG = e(|2,1|);
VG1 = e(|1,1|);
VG2 = e(|3,1|);
CovP = CovG + e(|5,1|);
VP1 = VG1 + e(|4,1|);
VP2 = VG2 + e(|6,1|);
* Create a module called "correl" that will estimate genotypic and phenotypic correlations 
and their standard errors;
start correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
RG = CovG/sqrt(VG1*VG2);
*Make the derivative vector for rg, note that the order of the rows and columns of the variance
covariance matrix is VG1, CovG, VG2, VError1, CovError, VError2;
dg = (-1/(2*VG1))//(1/CovG)//(-1/(2*VG2))//0//0//0;
varrg = (RG**2)*dg`*C*dg; serg = sqrt(varrg); 
RP = CovP/sqrt(VP1*VP2);
*Make the derivate vector for rp;
d1p = -1/(2*VP1);
d2p = 1/CovP;
d3p = -1/(2*VP2);
dp= d1p//d2p//d3p//d1p//d2p//d3p;
varrp = (RP**2)*dp`*C*dp; serp = sqrt(varrp); 
finish correl;
call correl(C, CovG, VG1, VG2, CovP, VP1, VP2, RG, RP, SERG, SERP);
print "Genotypic Correlation Between &trait1 and &trait2";
print RG serg;
print "Phenotypic Correlation Between &trait1 and &trait2";
print RP serp;
quit; run;
%mend;


%corr(vsp,vsb);
%corr(vsp,pm);
%corr(vsp,cm);
%corr(vsp,pbvdif);
%corr(vsb,pm);
%corr(vsb,cm);
%corr(vsb,pbvdif);
%corr(pm,cm);
%corr(pm,pbvdif);
%corr(cm,pbvdif);
run;

 

Rick_SAS
SAS Super FREQ

The (first) error message says that the error occurs during the macro call %corr(vsp,pbvdif);

In that call, the expression e[3,1] has a problem because e (which was created from the estmat data set) has only 2 rows.

 

I have two further comments:

1. Change the matrix subscript expressions e(|1,1|), e(|2,1|), e(|3,1|),  etc to use square brackets e[1,1], e[2,1], e[3,1],... That old syntax hasn't been used in 40 years.

2, Debug the program outside of the macro. Do not use a macro unless the program runs correctly on all datas.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1492 views
  • 1 like
  • 2 in conversation