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
|
.
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
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.
hi,
could you explain above table 5 summary of other diseases there we need to calculate N and percent?
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
yeah u r right we need to cal N and percent................ can u also help me with table 3 using only proc report
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.