Sorry about that 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 72 73 proc iml; NOTE: IML Ready 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.03 seconds user cpu time 0.03 seconds system cpu time 0.01 seconds memory 2067.96k OS Memory 30884.00k Timestamp 10/30/2020 02:05:44 PM Step Count 24 Switch Count 0 Page Faults 0 Page Reclaims 1068 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
... View more