BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anita_n
Pyrite | Level 9

Dear all,

I have a question about the prt value in proc means.

for a example using this example:

data test;
input dosis;
datalines;
21
15
19
18
20

;
run;


proc means data=test prt;
var dosis;
output out=results prt=p_Value;
run; 

I get this results for prt in the Result Viewer window

Anita_n_0-1639756629326.png

but in the output dataset this is changed to this (the less than symbol disappears) Is there anyway to avoid this?

Anita_n_1-1639756727880.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
ballardw
Super User

The symbol you see is in a table generating template for creating the Proc Means output. It does not exist in the data. You can assign a LABEL to the variable after you have created the data set to display different text when desired.

Note that generally variable names only contain letters, digits and the _ character, not special character like <. That can be done but generally the resulting extra work with code isn't worth the headache, at least in my opinion.

 

Here is an example of changing the label of the variable in the data set you create and then showing it with Proc Print:

proc datasets library=work nodetails;
modify results;
label p_value='Pr > |t|';
run;
quit;

proc print data=results noobs label;
run;

Many procedures will show the label by default, others such as Print need to be told when to use it. Others like Proc Freq may show both.

 


@Anita_n wrote:

Dear all,

I have a question about the prt value in proc means.

for a example using this example:

data test;
input dosis;
datalines;
21
15
19
18
20

;
run;


proc means data=test prt;
var dosis;
output out=results prt=p_Value;
run; 

I get this results for prt in the Result Viewer window

Anita_n_0-1639756629326.png

but in the output dataset this is changed to this (the less than symbol disappears) Is there anyway to avoid this?

Anita_n_1-1639756727880.png

 

 


 

Reeza
Super User
Apply the PVALUE format to the variable.

format p_value pvalue6.4;

https://documentation.sas.com/doc/en/vdmmlcdc/1.0/leforinforref/p0pzklcc1zxivxn1js2y5nkg2wq9.htm

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1092 views
  • 1 like
  • 3 in conversation