i develop my code in pc sas but ultimately run it on unix. I am running npar1way and using the ods KruskalWallisTest created. On unix the p-value is 'nvalue1' in this ods, in the former it's 'prob'. Is there an option i can add to my code so it won't use the newer variable name nvalue1, ie so the code i develop in pc sas works in unix in this scenario?
i can confirm that 'tables=restore' solves it, i had to implement it like this:
ods output KruskalWallisTest=kwpval (where=(name1='P_KW')); %if "&sysscpl" eq "X64_10PRO" %then %do; proc npar1way data=... wilcoxon plots=none tables=restore; %end; %else %do; proc npar1way data=... wilcoxon plots=none ; %end; class ... ; var ...; by ...; quit;
this produces the same result in pc sas and unix and and without errors
I am skeptical that on one operating system something named 'prob' is replaced by something named 'nvalue' in another operating system. This doesn't make sense. If anything, it sounds like a bug, if it is as you describe.
Please show us the output data sets (screen capture is fine, use the "Insert Photos" icon, do NOT attach files) from both runs of PROC NPAR1WAY so we can see this for ourselves.
i mean to say it's a version issue. At some point sas change this ods, although from a search online a can't find a sas note about this change, although maybe this is related: https://communities.sas.com/t5/Statistical-Procedures/ODS-OUTPUT-WilcoxonTest-for-PROC-NPAR1WAY-give...
i'll need to explore it more ... i have old macros using npar1way that no longer run because of this, so i've been aware of it for a while, but never looked into it until now, cheers
As I requested, please show us screen captures.
@pmbrown wrote:
i mean to say it's a version issue. At some point sas change this ods, although from a search online a can't find a sas note about this change, although maybe this is related: https://communities.sas.com/t5/Statistical-Procedures/ODS-OUTPUT-WilcoxonTest-for-PROC-NPAR1WAY-give...
i'll need to explore it more ... i have old macros using npar1way that no longer run because of this, so i've been aware of it for a while, but never looked into it until now, cheers
Each release for quite awhile SAS has provided summaries of what is new in the online help.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_whatsnew_sect036.htm which is the documentation for SAS/Stat 15.1 in the What's New listing for NPAR1WAY
The operating system is not the issue.
So something else has also changed.
What version of SAS are you using on both systems? Make sure to check the maintenance release number. You can look at the SYSVLONG macro variable.
What setting do you have for the VALIDVARNAME option?
Are the names of the variables using the analysis the same?
Is the rest of the code the same?
i can confirm that 'tables=restore' solves it, i had to implement it like this:
ods output KruskalWallisTest=kwpval (where=(name1='P_KW')); %if "&sysscpl" eq "X64_10PRO" %then %do; proc npar1way data=... wilcoxon plots=none tables=restore; %end; %else %do; proc npar1way data=... wilcoxon plots=none ; %end; class ... ; var ...; by ...; quit;
this produces the same result in pc sas and unix and and without errors
You are testing the wrong thing. You are testing what type of operating system you are running on. The change in behavior is based on the VERSION of SAS you are using, not the operating system it is running on. Your code will fail when your SAS version is finally updated so that it also generates the new structure by default. Test the value of SYSVLONG instead.
%let tables_restore=tables=restore;
%if "&sysvlong" < "9.04.01M6" %then %do;
%let tables_restore=;
%end;
proc npar1way data=... wilcoxon plots=none &tables_restore;
class ... ;
var ...;
by ...;
quit;
no, it just repeats what i already said in my earlier post
You can use the TABLES=RESTORE option in the PROC NPAR1WAY statement to display the score test tables in legacy, factoid (label-value) form. By default in newer releases, PROC NPAR1WAY displays these tables in tabular format.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.