🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Calcite | Level 5

## ERROR: (execution) Matrix has not been set to a value.

``````
1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73         proc iml;
74
75         print 'Question 1';
76         call randseed(123);
77         aplha=5;
78         nvec={250};
79         num_sim=10000;
80
81         free keep1;
82         do i=1 to nrow(nvec);
83         n=nvec[i,];
84
84       !  do j=1 to num_sim;
85
85       !  u=randfun(n,'uniform',0,1);
86
86       !  x=4/((1-u)**(1/alpha));
87
87       !  mme=(mean(x)/(mean(x)-4));
88
88       !  keep1=keep1//(n||num_sim||mme);
89
89       !  end;
90         end;
NOTE: Module RANDFUN loaded from the storage SASHELP.IMLMLIB.
ERROR: (execution) Matrix has not been set to a value.

operation : / at line 86 column 16
operands  : *LIT1013, alpha

*LIT1013      1 row       1 col     (numeric)

1

alpha      0 row       0 col     (type ?, size 0)

statement : ASSIGN at line 86 column 2
91
92         free keep2;
93         do k=1 to nrow(keep1) by num_sim;
94         e_mme=mean(keep1[k:k+(num_sim-1),3]);
95         bias_mme=e_mme-aplha;
96         var_mme=var(keep1[k:k+(num_sim-1),3]);
97         mse_mme=var_mme-bias_mme##2;
98         keep2=keep2//(e_mme||bias_mme||var_mme||mse_mme);
99         end;
100
101        free results;
102        results=nvec||keep2;
103        colnames_keep3='n'||'E[mme]'||'Bias[mme]'||'var[mme]'||'mse[mme]';
104        print results[colname=colnames_keep3];
105        quit;
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
user cpu time       0.02 seconds
system cpu time     0.00 seconds
memory              2080.78k
OS Memory           30884.00k
Timestamp           10/30/2020 03:08:08 PM
Step Count                        24  Switch Count  0
Page Faults                       0
Page Reclaims                     1065
Page Swaps                        0
Voluntary Context Switches        0
Involuntary Context Switches      0
Block Input Operations            0
Block Output Operations           0

106
107
108        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
120        ``````
1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

## Re: ERROR: (execution) Matrix has not been set to a value.

If the problem is solved, could you mark one of the answers and close the thread? Thanks.

5 REPLIES 5
Diamond | Level 26

## Re: ERROR: (execution) Matrix has not been set to a value.

``````  operation : / at line 86 column 16
operands  : *LIT1013, alpha``````

Does this not indicate the problem clearly enough? What is at Line 86, column 16? It is looking for a matrix named ALPHA, which does not exist.

--
Paige Miller
SAS Super FREQ

## Re: ERROR: (execution) Matrix has not been set to a value.

You have a typo in the program.

``aplha=5;``

should be

``alpha=5;``

Super User

## Re: ERROR: (execution) Matrix has not been set to a value.

Better post it at IML forum. Maybe you want this :

x=4/((1-u)**(1/alpha));
-->
x=4/((1-u)##(1/alpha));
Super User

SAS Super FREQ

## Re: ERROR: (execution) Matrix has not been set to a value.

If the problem is solved, could you mark one of the answers and close the thread? Thanks.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
• 5 replies
• 655 views
• 1 like
• 5 in conversation