Programming the statistical procedures from SAS

How to create a table of baseline characteristics

Reply
Occasional Contributor
Posts: 6

How to create a table of baseline characteristics

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

Grand Advisor
Posts: 9,458

Re: How to create a table of baseline characteristics

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

Occasional Contributor
Posts: 6

Re: How to create a table of baseline characteristics

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
Grand Advisor
Posts: 9,458

Re: How to create a table of baseline characteristics

But you didn't post some sample data yet ?

Esteemed Advisor
Esteemed Advisor
Posts: 6,989

Re: How to create a table of baseline characteristics

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.

Grand Advisor
Posts: 16,905

Re: How to create a table of baseline characteristics

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.

Ask a Question
Discussion stats
  • 5 replies
  • 1042 views
  • 0 likes
  • 4 in conversation