05-14-2015 02:29 PM
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:
|Age||Number of Patients (%)||p value||Unadjusted odds ratio||95% Confidence interval|
|No. of Visit|
|4 or more|
|mean (standard deviation)|
|Cancer of the pancreas|
|Congestive heart failure|
|Cancer of the cervix|
|Day of Visit|
05-14-2015 02:34 PM
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?
05-14-2015 02:41 PM
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.
05-14-2015 02:46 PM
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
05-15-2015 10:30 AM
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?
05-14-2015 04:09 PM
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.