I'm performing analysis with proc Mixed or glm and want to add a flag for p-values:
*** <= 0.001
** <= 0.01
* <=0.05
I used to do this all the time but after moving to new companies I do not remember my code.
Also should I use the '<=' or just '<' ? Is there a symbol code for the '<=' if I need that and what is it?
I found the symbol code for degree in temperature.
Thank you.
Theresa
In PROC REPORT, you can assign a format in the DEFINE statement.
Which parts of the MIXED or GLM output would you like to see this?
I think your choices on this are to output the MIXED/GLM output to a SAS data set, and then create a custom format to add the stars. Perhaps you could also use PROC TEMPLATE to modify the appearance of the output via changing the format there, but that's beyond my pay grade.
The numbers displayed ALWAYS relate to a format. So you capture the number value of the P-value in the and assign a custom format.
Proc format; value asterisk 0 - 0.001 = '***' 0.001 <- 0.01 = '**' 0.01 <- 0.05 = '*' other = [5.3] ; run;
Assign the asterisk format in the Proc report code to the variable.
I though this "more significant" multiple asterisk nonsense had gone away.
How do I apply this to the p-values prior to putting them within the report?
Of course the p-values are pvalue8.4 format, but do I use the above format instead with them?
Thank you.
In PROC REPORT, you can assign a format in the DEFINE statement.
In other words, use the format suggested above in Proc Report?
Thank you.
I was given a picture code which looks like what I used to use.
It is:
Proc format;
picture pvalue3F (round)
0.999 <- HIGH = '>0.9999' (NOEDIT)
0.100 <- 0.999 = '9.9999'
0.050 <- 0.100 = '9.9999'
0.010 <- 0.050 = '9.9999 (*)'
0.001 <- 0.010 = '9.9999 (**)'
0.0001 <- 0.001 = '9.9999 (***)'
0.0001 = '9.9999 (***)'
LOW -< 0.0001 = '<0.0001 (****)' (NOEDIT)
. - .z = ' ' (NOEDIT)
other = ' ' (NOEDIT)
;
run;
within the dataset I use:
pvalue3Fmt = put(pvalue, pvalue3F.);
Works Great!!!!
This didn't work.
I have the format set as I showed above and in Proc Report I have:
Proc format;
value asterisk
0 - 0.001 = '***'
0.001 <- 0.01 = '**'
0.01 <- 0.05 = '*'
other = [5.3]
;
run;
proc report data=SASDB.ruggedness_temp_lot
nowd headline split='*' spacing=4 missing spanrows
style(report)={just=center outputwidth=10 in}
style(lines)=header{background=white asis=on font_size=10pt font_face="TimesRoman" just=left font_weight=bold}
style(header)=header{background=white font_size=10pt font_face="TimesRoman" frame=box
font_weight=bold}
style(column)=header{background=white font_size=10pt font_weight=medium}
;
columns Name Effect Lot Temp _lot _temp estimate probt ;
define Name / 'Model' order=internal;
define Effect / 'Effect' order ;
define probt / 'P-value^{super 1}' format=$asterick. center style(column)=[cellwidth=.5in];
define LOT / group 'LOT' center style(column)=[cellwidth=.5in];
define Temp / 'Temperature C^{unicode 0B0}' order center style(column)=[cellwidth=.5in];
define _lot / order=data 'vs Lot' center style(column)=[cellwidth=.5in];
define _temp / order=data 'vs Temperature C^{unicode 0B0}' format=F8.4 center style(column)=[cellwidth=.5in];
define estimate / order=data 'Estimate' format=F8.4 center style(column)=[cellwidth=.5in] ;
define LSMean / order=data 'LSMean Esdtimate' format=F8.4 center style(column)=[cellwidth=.5in] ;
define probt / 'P-value^{super 2}' format=$asterick. center style(column)=[cellwidth=.5in];
compute before _page_/ ;
line ' ';
line "Mean RNA Concentration Adjusted on Dilution (µg/mL) by Lot using Ruggedness by Temperature C^{unicode 0B0}";
line ' ';
line '1 * <= 0.05, ** <= 0.01, *** <=0.001, **** <= 0.0001';
line ' ';
endcomp;
run;
What is wrong???
Thank you for your assistance.
I could not get your suggestion to work and the other suggested to me didn't work within Proc Report. It didn't like the picture format.
HELP!!!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.