Help using Base SAS procedures

Proc Report Help -- extra rows from missing data when using nested columns

Reply
N/A
Posts: 1

Proc Report Help -- extra rows from missing data when using nested columns

I'm struggling with the syntax to rid my proc report summary of "extra" rows because of missing data. I would like to "compress out" the missing values that create many rows in my current report. I think it is easier to show an example rather than try to explain what I am try to do.

So here's the look of my current report...
(Note: the "." are there just to get the correct spacing for this post.)

....................<---- Drug 1 ---->..........<---- Drug 2 ---->
....................Dose 1....Dose2...........Dose 1.....Dose2
Trial 1.............10%..........-..................12%.........-.....
Trial 1...............-............11%................-...........15%..

Trial 2.............11%..........-..................13%.........-.....
Trial 2...............-............11%................-...........13%..



But I really want my report to look like this....

....................<---- Drug 1 ---->..........<---- Drug 2 ---->
....................Dose 1....Dose2...........Dose 1.....Dose2
Trial 1.............10%........11%..............12%.......15%....
Trial 2.............11%........11%..............13%.......13%....


My dataset is structured as follows...

Trial Dose Drug1 Drug2
Trial1 Dose1 10% 12%
Trial1 Dose2 11% 15%
Trail2 Dose1 11% 13%
Trail2 Dose2 11% 13%


My proc report code looks like this...
-
-
-
columns trial drug1, dose drug2, dose;
-
define trial /group 'Trial';
define drug1 /display 'Drug1';
define drug2 /display 'Drug2';
define dose /display across 'Dose'


Ideas anyone? I'm stumped.
Ask a Question
Discussion stats
  • 0 replies
  • 79 views
  • 0 likes
  • 1 in conversation