Hello All,
I am trying to run a simulation for the normality test. I have the following program which is running well. But I have a problem with output. It is always printing output tables of "proc univariate." When I use "NOPRINT" I received the same answer and warning "
verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used." Without NOPRINT, It prints the proc univariate output so program stuck in the middle of the simulation. "I greatly appreciate any suggestions.
%let N=10;
%let outlierPct=5;
%let NumSamples = 100;
data simulation(keep=sim y);
do sim=1 to &NumSamples; /* 1. create many samples */
call streaminit(12345);
outlierNb = round(&N.*&outlierPct./100);
do i = 1 to outlierNb;
y = rand("Normal",0,4);
output;
end;
do i = outlierNb+1 to &N.;
y = rand("Normal",0,1);
output;
end;
end;
run;
*ods listing close;
*ods select html close;
ods select TestsforNormality;
proc univariate data=simulation normaltest noprint ;
by sim;
var y;
ods output TestsforNormality=normaltest;
run;
*ods listing;
*ods html;
*create 0/1 variable for rejection of hyphotesis;
data normaltest;
set normaltest;
reject=(pValue<0.1);
run;
*calculate the chance of rejection;
proc means data=normaltest mean;
var reject;
class Test;
run;
... View more