BookmarkSubscribeRSS Feed
alpdadalman
Calcite | Level 5

Dear friends, I am a beginner user at SAS.  I am comparing 3 groups scores with using npar1way MEDIAN procedure on simulation data.  I want to compute a type I error rate on this data set according to MEDIAN test and just want to see this knowledge on the screen without a MEDIAN test output.  From my simulation study lets say my code is like below..this a simple code and returns me an output of MEDIAN procedure 50 times(repetition number... just arbitrarily) . I just want to filter p-values obtained form each comparison (totaly 50 p-values) and to compute a type I error rate base on these p-values when comparing to alpha=0.05.

 

thanks for your valuable time

Alp

proc npar1way MEDIAN data=Simulation;
by SampleID;      
class group; 
      ods output MEDIAN=OutMEDIAN;
run;
5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You can use ods output to select parts of the outputs created:

ods trace on;
proc
npar1way MEDIAN data=Simulation; by SampleID; class group; ods output MEDIAN=OutMEDIAN; run;
ods trace off;

If you run that with the trace on, in the output window you will see a block for each component created by the procedure, there tends to be a fair few, which you can select with some options in the procedure.  If you only want to see parts of the output, you can simply specify this with (and depends what the part is called):

ods output <modelpart> = <stored dataset>;
proc
npar1way MEDIAN data=Simulation; ...

The <modelpart> you get from the output window output and is determined by what you want to see, the <stored dataset> is where you want to store the output.  You can then proc print the stored dataset to see it in the output window.

Here is the SAS help on this topic:

http://documentation.sas.com/?docsetId=odsug&docsetTarget=p1fpt3uuow90o3n155hs7bp1mo7f.htm&docsetVer...

alpdadalman
Calcite | Level 5
Thanks for your response..hope to overcome this problem

best regards
A_Gkce
Calcite | Level 5

Hi, 

I have the same mistake. I want to make a table that gives computed type I error rate from the comparison repeat  at 50 times. From the Van der Waerden test p values should be drawn and the type 1 error calculated.How can I get output as a single table.

 

 

%mend;

%macro simu (r=, n1=, n2=, n3=, mu1=, mu2=, mu3=, sigma1=, sigma2=, sigma3=,
times=);
data Simulation(drop=i);
do SampleID = 1 to &Times;
do i = 1 to &n1;
group=1; y=rand("normal",&mu1,&sigma1);/* Group 1: x ~ N(mu1,sigma1^)
*/
output;
end;
do i = 1 to &n2;
group=2; y=rand("normal",&mu2,&sigma2); /* Group 2: x ~
N(mu2,sigma2^) */
output;
end;
do i = 1 to &n3;
group=3; y=rand("normal",&mu3,&sigma3); /* Group 3: x ~
N(mu3,sigma2^) */
output;
end;
end;
run;

proc npar1way VW data=Simulation;
by SampleID;
class group;
ods graphics off;

run;

 
%mend;

%simu (n1=5, n2=5, n3=5, mu1=10, mu2=10, mu3=10, sigma1=1, sigma2=1, sigma3=1,
times=50);


run;

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Read my post, select the component output parts you want, then merge or set them together to form a final dataset.  

alpdadalman
Calcite | Level 5

unfortunately can't find a soluation to this problem... thanks again to give your valuable time again

 

best regards

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 823 views
  • 0 likes
  • 3 in conversation