BookmarkSubscribeRSS Feed
prk4sas
Calcite | Level 5

proc import table = 'history_bk' out = table3 (keep= smkyncig smkyyears alcyndpw)

dbms  = access2000

replace;

database = 'E:\sas\Tables\DATA_DEPR01.mdb';

run;

proc sort data=table3;

by smkyncig;

run;

proc means data= table3;

var smkyncig smkyyears alcyndpw;

output out= testmean n=

                    mean=

                    stddev= /autoname;

run;

O/P SHUD LOOK SOMETHING LIKE THIS

Table 3. Analysis of Smoking History and Alcohol Consumption

  1. No. of Cigars Smoked
    No. of Years Smoked
    No. of Drinks Per Week

.

Table 5. Summary of Other diseases

Cardio

                NAD

                NS

                S1S2N

Respiratory

Clear NVBS

                NAD

Abdomen

Liver Palpable

              NAD

        Soft and no mass felt

    Soft and non Tada

Central Nervous System

Clinically N

              NAD

Note: No patients were found with Angina, Myoinfa, Allergy and Cerinc

4 REPLIES 4
ballardw
Super User

If you're looking for a report output table 3 could be done several ways. Here's an example with Tabulate

Proc tabulate data = table3;

     var smkyncig smkyyears alcyndpw;

     table smkyncig smkyyears alcyndpw , n mean stddev;

run;

Table 5 I think needs some clarification, especially regarding the data structure of the source. Are the indented row headers values of the variable indicating a cardio, respiratory or Abdomen illness? Or is there a single variable indicating illness that needs to be grouped as indicated?

Also, which statistics are required for the blanks in the columns?

And generating a footnote as shown is going to take lots of additional information such as possible values and then a pass through the data to determine which ones are not involved.


spl
Calcite | Level 5 spl
Calcite | Level 5

hi,

could you explain above table 5 summary  of other diseases there we need to calculate N and percent?

prk4sas
Calcite | Level 5

thank you so much!!! but I need a code to be written with proc report for the tables. Its not accepting the access database to share for your clear picture. Would send u the original database with my requirements if you can share your email id.

my email id is - rpaladugu27@yahoo.com

prk4sas
Calcite | Level 5

yeah u r right we need to cal N and percent................ can u also help me with table 3 using only proc report

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 903 views
  • 0 likes
  • 3 in conversation