Hi,
I want to create a table like this:
Diseases | Group 1 (also a variable) | Group 2 (also a variable) |
---|---|---|
Variable 1 | Sum and percentage | Sum and percentage |
Variable 2 | Sum and percentage | Sum and percentage |
Variable 3 | Sum and percentage | Sum and percentage |
Variable 4 | Sum and percentage | Sum and percentage |
Variable 5 | Sum and percentage | Sum and percentage |
Do anyone know how to to the programing? I have tried but it hasn't worked out yet.
Thanks in advance!
/Chris
Assuming you want what I think you want, you need the percentages and numbers in the same cell.
Based on each work environment I've found that you do need to customize each macro/report, but there are A TON of papers on Lexjansen.com that cover this.
Here's one example, starting on page 9 of the report. Good Luck.
http://www2.sas.com/proceedings/forum2008/173-2008.pdf
EDIT: Note the Resources section:
RESOURCES
You can download the programs and data in this paper from the SAS Web site for Technical Papers and Presentations for SAS Global Forum 2008 Conference at support.sas.com/rnd/papers/. Alternate versions of some of the programs are included in the downloadable zip file. These versions show more macro coding, alternate versions of the same program, or the downside of using some of the techniques in non-HTML destinations.
proc tabulate ,proc report , proc sqll all could get it. All you need is to post an example to explain it .
Hi again,
Thanks for the reply! I have a dataset with the following variables hyperlipidemi DM_type IHD_disp antal_tidl_CABG sex.
I want the table to look like this. All variables are categorial.
sex=1 | sex=0 | |
hyperlipidemi | ||
DM_type | ||
IHD_disp | ||
antal_tidl_CABG |
But you didn't post some sample data yet ?
Hi,
I don't mean to be standoffish, but this is something your employed to do. Much the same that I have to produce these tables as well. Its not a question requiring an answer. You can have a look at the PHUSE Wiki:
http://www.phusewiki.org/wiki/index.php?title=Standard_Script_Index
They have some example code which may help you, however you would need to follow your SOPs and coding guidelines.
Assuming you want what I think you want, you need the percentages and numbers in the same cell.
Based on each work environment I've found that you do need to customize each macro/report, but there are A TON of papers on Lexjansen.com that cover this.
Here's one example, starting on page 9 of the report. Good Luck.
http://www2.sas.com/proceedings/forum2008/173-2008.pdf
EDIT: Note the Resources section:
RESOURCES
You can download the programs and data in this paper from the SAS Web site for Technical Papers and Presentations for SAS Global Forum 2008 Conference at support.sas.com/rnd/papers/. Alternate versions of some of the programs are included in the downloadable zip file. These versions show more macro coding, alternate versions of the same program, or the downside of using some of the techniques in non-HTML destinations.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.