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;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.