BookmarkSubscribeRSS Feed
mlogan
Lapis Lazuli | Level 10

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
10 REPLIES 10
M_Maldonado
Barite | Level 11

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

mlogan
Lapis Lazuli | Level 10

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.



M_Maldonado
Barite | Level 11

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!

mlogan
Lapis Lazuli | Level 10

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,

Reeza
Super User

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?

ballardw
Super User

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

Reeza
Super User

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.

Reeza
Super User

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

mlogan
Lapis Lazuli | Level 10

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!

Ksharp
Super User

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 10 replies
  • 1261 views
  • 0 likes
  • 5 in conversation