- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Users,
I am trying to add an asterisk to the implausible values in the SAS output. I concatenate the asterisk in the dataset but when I use proc report for the output , the outputs doesn't show asterisk because it is in character format. Is there any option in the proc report to concatenate asterisk to the specific values. Here I am trying to concatenate asterisk to (Descriptive stats)Max values
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Using SASHELP.CLASS, and a PICTURE format, you can specify a way to alter the display of a value. In this example, for any age that is 15, I want to have an asterisk appended to the variable value. The PICTURE format is not only available to use with PROC REPORT, you can use this type of format with other procedures too:
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Using SASHELP.CLASS, and a PICTURE format, you can specify a way to alter the display of a value. In this example, for any age that is 15, I want to have an asterisk appended to the variable value. The PICTURE format is not only available to use with PROC REPORT, you can use this type of format with other procedures too:
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much. I got the expected output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Cynthia_sas's approach is where I would start.
With simple range of values it is easy. But, implausible for one record/group might be plausible for another.
Consider a measurement of people like height. If your data includes children to adults then a value of 6 feet might be "implausible" for a 5 year but quite plausible for a 30 year old male.
So if your range of "plausible" varies based on the values of one or more other characteristics then you should provide such description/examples. In such cases I would expect to have to summarize the data before displaying the result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, @ballardw makes a fair point. If you need to do some kind of highlighting based on the values or interaction between 2 or more columns, then you would need to move to a COMPUTE block with PROC REPORT as shown below:
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Cynthia_sas Hi , I have a follow up question , I assign the asterisk using the picture format. I need this format for only one treatment arm(180mg) , but its getting duplicated other values. Please find the attached pdf output
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Without seeing ALL of your code and having some test data, it is impossible to make a constructive comment. The one thing that I can think might cause the behavior you describe, is if you might have an ACROSS variable on your report? If so, then a simple format won't work in that case. You'll have to use CALL DEFINE, as I showed in my last posted example, where I tested height and weight. But with an ACROSS item, the code gets a bit more complex. You'll have to use absolute column numbers in the CALL DEFINE. I could not open your PDF file because it got an error.
Here's an ACROSS example where I only want to add an asterisk for the WEIGHT value under the M Across column:
Here's a paper that talks more about using ACROSS items with PROC REPORT http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf
. Of course, if I guessed wrong, then you'll need to explain in more detail providing code and data. Or work with Tech Support on this. Tech Support can look at ALL your data and ALL your code and answer your question.
Cynthia