BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
TANMOY05
Obsidian | Level 7
proc npar1way data=lb3 wilcoxon ;
	where cohort in ('Cohort 1','Cohort 3') and visitn>0 and chg>. ;
 &tst. where also stratum='HV+CKD' and testcd='FE' and visitn=12 ;
	var chg ;
	exact wilcoxon ;
	class cohort ;
	by stratum testcd test visitn ;
	output out=wrstst13(keep=stratum testcd test visitn xp2_wil) wilcoxon ;
run ;

In the above code in the output statement it is written to keep variable xp2_wil  , but there is no xp2_wil variable present in lb3 , so how come xp2_wil variable  is getting created.?

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Since virtually every question we get in this forum could be described as "How the code is functioning", you need to provide more specific subject lines, so that people who are familiar with PROC NPAR1WAY might be able to help, while those people who have never heard of PROC NPAR1WAY can skip reading your question if desired. By doing this, you make the forums more useful to everyone. We appreciate the help.

 

Please change the title to "Unexpected output from PROC NPAR1WAY".

 

XP2_WIL is an expected output from PROC NPAR1WAY when a Wilcoxon test is requested, see https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_npar1way_details32.htm&docsetVers...

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Please go back and provide a meaningful subject line to your post.

--
Paige Miller
Kurt_Bremser
Super User

Maxim 1: Read the Documentation.

 

In the Details for the NPAR1WAY Procedure, section Contents of the Output Dataset, is a table showing all variables created by the procedure.

PaigeMiller
Diamond | Level 26

Since virtually every question we get in this forum could be described as "How the code is functioning", you need to provide more specific subject lines, so that people who are familiar with PROC NPAR1WAY might be able to help, while those people who have never heard of PROC NPAR1WAY can skip reading your question if desired. By doing this, you make the forums more useful to everyone. We appreciate the help.

 

Please change the title to "Unexpected output from PROC NPAR1WAY".

 

XP2_WIL is an expected output from PROC NPAR1WAY when a Wilcoxon test is requested, see https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_npar1way_details32.htm&docsetVers...

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 513 views
  • 2 likes
  • 3 in conversation