You should have handled the missing values before you transposed it.
@Hello_there wrote:
My actual data came from PROC means and when I transposed it by visit, with id being treatment, that’s when the blanks appeared bc not every treatment had a visit
Show the code. I have never seen PROC MEANS make some thing that looks like '3 (4)' as output. I generally only creates numeric values.
So do the step to add the visits before the proc means. Then the step that is making it pretty for the transpose can deal with the missing values.
If you don't have a dataset with the set of valid id*visit combination you can easily make one.
Example:
data have;
input id visit value ;
cards ;
1 1 100
1 2 112
2 1 200
3 2 300
;
proc sql ;
create table for_analysis as
select *
from have
natural full join
( select * from (select distinct id from have),(select distinct visit from have) )
;
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.