This is the second week assignment of my Data management course from coursera.
Following is the program I wrote in SAS Studio to submit as a part of week2 home work.
LIBNAME mydata “/courses/d1406ae5ba27fe300″ access=readonly;
DATA new; set mydata.nesarc_pds;
LABEL S3AQ3B5=”frequency of chewing”
S3AQ8A6=”tried to stop more than once”
S3AQ8C4=”Happened before 12 months ago”;
/* These are the labels which denotes the variables I have used in this program */
/*subsetting data to include only consumers with more than 1 year of use*/
PROC SORT; BY IDNUM;
PROC SORT; by IDNUM;
PROC FREQ; TABLES S3AQ3B5 S3AQ8A6 S3AQ8C4 ;
And following are the output tables of the program:
|frequency of chewing|
|Frequency Missing = 7118|
|tried to stop more than once|
|Happened before 12 months ago|
Summary of the Tables:
- A large number of people use to chew tobacco on daily basis (33%).
- Also, a large group used to chew tobacco only once a month (32%) (variable 6)
- Data of 7118 people is missing.
- About 69 % of people have tried to stop their habit but failed
- ALL OF THESE RESULTS ARE EVALUATED ONLY FOR PEOPLE WHO HAVE STARTED THIS FOR MORE THAN 1 YEAR AS SHOWN BY TABLE3. (if condition)