Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Dynamic Summary Table

Reply
Regular Contributor
Posts: 215

Dynamic Summary Table

Hi All,

I never worked on a Dynamic Summary Table. Can anyone help me with some example code/reference/suggestion on how to produce a Summary table like this:

Significant variables
AgeNumber of Patients (%) p valueUnadjusted odds ratio95% Confidence interval
6592 (30.5) p<.01
65-7565 (45.4) 0.25-0.48
75-8445 (41)
85+30 (23.8)
No. of Visit
1
2
3
4 or more
mean (standard deviation)
median (range)
Diagnosis
Breast Cancer
Lung cancer
Cancer of the pancreas
Congestive heart failure
Copd
Cancer of the cervix
Others
Admission
Yes
No
Day of Visit
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
Super Contributor
Posts: 336

Re: Dynamic Summary Table

Several procs will give you results similar to that.

I would start with proc freq or proc univiriate.

Personally I like univariate because you can output the results and then print them in a convenient way.

Curious, did you design that output? Are you converting it from some report, or what you up to?

Thanks,

M

Regular Contributor
Posts: 215

Re: Dynamic Summary Table

Hi MiguelMaldonado,

Thanks for your help. Yes I just designed that output the way I want in an excel spreadsheet. I just don't know how to get that output from my data. Your suggestion would be a good place to start with.



Super Contributor
Posts: 336

Re: Dynamic Summary Table

When I want to convert my Excel reports to a SAS proc I use proc report. It is kind of old school and has a little bit of steep learning curve, but I found it really useful.

Proc report with a custom format (through proc format) can do 90% of the things you have on that report.

For the confidence interval you might have to use a stats proc like univariate or freq.

Google proc report examples and see if that suits your report needs.

Here a paper that seems like a tood start: Proc Report beyond the Basics

Good luck!

Regular Contributor
Posts: 215

Re: Dynamic Summary Table

Hi MiguelMaldonado,

I actually want to import excel dataset to sas, analyse the data  in SAS, and output in pdf or in other format which will look like what I posted.

Thanks,

Super User
Posts: 17,837

Re: Dynamic Summary Table

That's a bunch of different steps just a quick outline below. It can be broken down further as well.

1. Import data and verify data is imported correctly - e.g. numeric variables are numeric and chars are chars

2. Format the data for the analysis required

3. Running analysis for variables to determine results required

4. Converting code from step 3 into macro

5. Running a macro

Where are you in the process?

Super User
Posts: 10,500

Re: Dynamic Summary Table

Including a p-value indicates some sort of statistical test is to be performed. What do want to test? Compared to what population?

Super User
Posts: 17,837

Re: Dynamic Summary Table

It looks like you'll need a macro - I'm assuming you're running a univariate logistic regression since you state unadjusted odds ratio -though you could obtain that from proc freq as well.

Search Lexjansen.com for clinical reporting macros and you should find something pretty close. A lot of it depends on how your data is structured and what you want as reference variables and such.

Super User
Posts: 17,837

Re: Dynamic Summary Table

Also, what does dynamic refer to here? I'm not sure this belongs in Data Mining but ODS reporting instead.

Regular Contributor
Posts: 215

Re: Dynamic Summary Table

Hi Reeza,

I am not quite sure if I should call it 'dynamic'... I just thought this type of report is called 'dynamic summary report'....may be I am wrong!

Super User
Posts: 9,681

Re: Dynamic Summary Table

proc sql  +  proc transpose     to do such table/listing  .

Ask a Question
Discussion stats
  • 10 replies
  • 459 views
  • 0 likes
  • 5 in conversation