Exercise 4: Counts and



Exercise 4: Counts and

Summarizing Data

Be sure that you have set up a libname statement to define the SASDATA2 library before you begin this exercise.

libname sasdata2 "C:\Users\kwelch\Desktop\sasdata2";

1. Using the autism_socialization SAS dataset, create a new dataset called autism_countdata that contains a variable called VISIT that counts the visits for each child. This dataset should have 896 observations (the same as the autism_socialization dataset).

2. Create another new dataset called autism_lastvisit from autism_countdata that contains only the last visit for each child, along with the total number of visits for that child. This dataset should have 213 observations in it.

3. If you have time, create another dataset called autism_firstvisit that contains only the first visit for each child. This dataset should also have 213 observations.

4. Use Proc Means to create a summary dataset called autism_summary from autism_socialization that contains the following statistics:

mean of VSAE (MEAN_VSAE)

minimum of VSAE (MIN_VSAE)

maximum of VSAE (MAX_VSAE)

standard deviation of VSAE (STD_VSAE)

n of VSAE (N_VSAE)

mean of AGEAUTO (MEAN_AGE)

minimum of AGEAUTO (MIN_AGE)

maximum of AGEAUTO (MAX_AGE)

standard deviation of AGEAUTO (STD_AGE)

n of AGEAUTO (N_AGE)

This new dataset should contain 213 observations, one for each child in the dataset.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download