BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ChrisMac
Fluorite | Level 6

Hi,

I want to create a table like this:

DiseasesGroup 1 (also a variable)Group 2 (also a variable)
Variable 1Sum and percentageSum and percentage
Variable 2Sum and percentageSum and percentage
Variable 3Sum and percentageSum and percentage
Variable 4Sum and percentageSum and percentage
Variable 5Sum and percentageSum and percentage

Do anyone know how to to the programing? I have tried but it hasn't worked out yet.

Thanks in advance!

/Chris

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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.

View solution in original post

5 REPLIES 5
Ksharp
Super User

proc tabulate ,proc report , proc sqll  all could get it. All you need is to post an example to explain it .

ChrisMac
Fluorite | Level 6

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=1sex=0
hyperlipidemi
DM_type
IHD_disp
antal_tidl_CABG
Ksharp
Super User

But you didn't post some sample data yet ?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Reeza
Super User

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 5 replies
  • 9908 views
  • 1 like
  • 4 in conversation