logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Hariom KasyapFinance
(5/5)

944 Answers

Hire Me
expert
Dayanara AliPolitical science
(5/5)

890 Answers

Hire Me
expert
Stevan DuignannNursing
(5/5)

724 Answers

Hire Me
expert
Ashok MalhotraComputer science
(5/5)

987 Answers

Hire Me
SAS
(5/5)

what is the total number of daily cigarettes smoked by the participants in the first 50 observations

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

This exercise uses adapted versions of the data sets DEMO_B.sas7bdat, SMQ_B.sas7bdat and L06_B.sas7bdat, available on Canvas.

 

1. At the top of your SAS Editor file, please type your name and X.500 in the following format:

/*First Last     X.500 */
(1 points)

2. Check the contents (PROC CONTENTS) of the three SAS data sets provided.
(21 points)

a. How many variables are there in each data set? How many labels are there in each data set? What is the function of labels?
(8 points)

b. How many observations are there in each of the data sets?
(3 points)

c. What information is contained in the column labeled “#”? What option would you use to order this column in ascending order? Write the necessary code (use the data set DEMO_B).
(4 points)

d. You are interested in knowing more about current cigarette smokers and levels of cotinine, a biomarker associated to smoking.
How can you use PROC CONTENTS to find the two variables in the datasets that contain the information you are interested in? Report the variables names and which data set(s) contain these variables.

(6 points)

3. Use the appropriate procedure to print the data to the SAS output window (*NOTE: don’t confuse “print” with traditional hard copy printing - you should not print paper copies of the data for this question). For the following questions, use data set SMQ_B.sas7bdat.

Respondent Sequence Number (SEQN) is the variable that identifies participants by number.  Run the following command first, to order the dataset by descending SEQN.
(25 points)

 PROC SORT data = "FILEPATH/SMQ_B.sas7bdat";

by DESCENDING SEQN;

run;

 a. Based on the large number of observations in this dataset, it can be advantageous to only print a small number of observations. What code would you use to look at only the first (i.e. highest SEQN) 50 observations?
(4 points)

b. The variable SMD030 is labeled Age started smoking cigarets (sic) regularly.  Among the first 50 observations, which two participants reported starting to smoke at the earliest ages?  Report their SEQN and ages.

What statement can you use to assure only the relevant variables (SEQN and SMD030) will be printed? Include the code used in your answer.
(5 points)

c. What is the total number of daily cigarettes smoked by the participants in the first 50 observations?
Use the PRINT procedure, the SUM statement and the variable SMD070 (# cigarettes smoked per day now) to answer this question. Include the code used in your answer.
(5 points)

d. What Statement option would you use to print only observations corresponding to those who smoke cigarettes “some days”?  Write down the code used to include only the first 50 “some days” cigarette smokers (SMQ040 = 2) in your output.
(3 points)

e. The variable SMD090 contains information on the average number of cigarettes smoked per day over the past 30 days.
Using this variable and the correct statements within the PRINT procedure, report the total number of cigarettes smoked (over the past 30 days) among the first 50 observations of those who reported smoking “some days”
(SMQ040 = 2).
Calculate (by hand) the mean number of cigarettes smoked daily among these 50 participants.
(4 points)

f. Repeat the previous step among those who reported smoking daily (SMQ040 = 1). Using the variable SMD090 and the correct statements within the PRINT procedure, report the total number of cigarettes smoked daily among first 50 observations.
Calculate (by hand) the mean number of cigarettes smoked daily among these 50 participants.
(4 points)

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme