Display results as :

Rechercher Advanced Search


free forum

Assignment 1 (Base SAS)

Go down

Assignment 1 (Base SAS) Empty Assignment 1 (Base SAS)

Post  pallav on Wed Apr 11, 2012 11:33 pm

The Able Company claimed in TV advertisements that taking its product Super-Drowsy reduced the time to fall asleep by 46% over the time necessary without pills. Able based this claim on a sleep study. Persons were asked to record how long they took to fall asleep (`sleep latency') in minutes, and their average for a week was calculated. In the next week these persons received Super-Drowsy and recorded their sleep latency. The following table gives the average sleep latency for each of the 73 persons first for the week without Super Drowsy and then for the week with Super Drowsy.

You can download data after register to this forum. Data is called sleep.txt (please see attached file)

Reply to this forum by answer (code) and description. I will reply with corrections if required.

Tasks to perform

1. Put the data above into a SAS data set containing 3 variables and use Patient, Week 1 and Week 2 as labels. Refer to Data Step Basics , SAS Variables, and Input Statement (List) for assistance.

Hint: Your input statement should end in @@ here.

2. Use proc sort to arrange the data in increasing order by patient number. Print this sorted data set using proc print.

3. Use proc means to compute the mean and standard deviation of the sleep latency times for each individual week. Also find a 90% confidence interval for the weekly mean sleep latency time. Make a nice printout of this information too.

4. Briefly describe a reasonable procedure that could be used to test statistically for the effectiveness of the drug. No more than a short paragraph here!

Since two sleep latency measurements, given in the file sleep.dat, are taken on each patient, one correct method for testing for effectiveness of the drug is to do a paired comparison t-test. To do this test, the difference of the sleep latency times for each patient must be computed. As is described in Defining New Variables this can be done easily by defining a new variable in the data step.


1. Use proc means and the modified data set to test for effectiveness of the drug. Turn in a neat printout of the RESULTS of using proc means. There's no need to print out the actual data. Turn in a copy of your program too.

Give a SHORT answer to the question: is the drug effective? Don't forget to use the title statement to put your name and project number on each page of the printout.
Assignment 1 (Base SAS) Attachment
sleep.txt You don't have permission to download attachments.(2 Kb) Downloaded 16 times


Posts : 98
Join date : 2012-03-14
Location : Ahmedabad

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum