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
but in the output dataset this is changed to this (the less than symbol disappears) Is there anyway to avoid this?
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
but in the output dataset this is changed to this (the less than symbol disappears) Is there anyway to avoid this?
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.