Computer Applications for PH Researchers – PROJECT 2

Please read carefully and follow all instructions

Scenario (fabricated):

This year, four schools districts within Florida collected absentee information from students within their school settings. The primary goal was to describe those students that seemed to be missing school the most. Were there gender differences? Were there differences by race? Do “slow learners” miss more school than “active learners”? Does absenteeism vary by grade level? At one of the districts administrative offices, a staff member put a great deal of time into compiling a nice table summarizing the number of absences missing by students. The problem is that the table is NOT conducive to analyses – you are going to help the schools districts summarize their findings. The table is below:

Learning Type
Slow leanrer / Active learner
District / Race / Gender / Elementary / Middle / High / Elementary / Middle / High
Hillsborough / B / M / 100 / 300 / 1600 / 750 / 250 / 700
F / 150 / 1150 / 2350 / 450 / 550 / 850
W / M / 3350 / 850 / 1800 / 750 / 600 / 150
F / 1250 / 350 / 700 / 400 / 1650 / 700
O / M / 1650 / 700 / 1150 / 850 / 250 / 1100
F / 200 / 1600 / 3700 / 450 / 600 / 750
Pinellas / B / M / 3800 / 650 / 1750 / 700 / 550 / 250
F / 1050 / 400 / 650 / 350 / 2200 / 1050
W / M / 1550 / 750 / 1100 / 900 / 600 / 1250
F / 250 / 1650 / 2700 / 450 / 650 / 450
O / M / 2800 / 1150 / 1550 / 650 / 800 / 300
F / 600 / 450 / 1150 / 450 / 2050 / 1100
Sarasota / B / M / 350 / 350 / 1650 / 650 / 200 / 750
F / 100 / 950 / 1350 / 500 / 600 / 900
W / M / 1700 / 550 / 1550 / 850 / 750 / 50
F / 1200 / 300 / 850 / 200 / 1600 / 750
O / M / 1600 / 3700 / 10 / 400 / 350 / 2000
F / 335 / 1750 / 1550 / 2100 / 700 / 100
Polk / B / M / 480 / 650 / 550 / 650 / 1600 / 800
F / 220 / 1100 / 950 / 1600 / 650 / 50
W / M / 1640 / 2700 / 500 / 450 / 400 / 1450
F / 1185 / 1550 / 1900 / 2150 / 750 / 50
O / M / 100 / 300 / 1600 / 750 / 250 / 700
F / 150 / 1150 / 2350 / 450 / 550 / 850

Objective:

You want to analyze the data from a “flat file”. Write a SAS program using ARRAY statements to read the above data and to create a SAS dataset that contains 144 observations and whose first 12 observations look like:

Obs district race gender learntype level absences

1 Hillsborough B M Slow Elementary 100

2 Hillsborough B M Slow Middle 300

3 Hillsborough B M Slow High 1600

4 Hillsborough B M Active Elementary 750

5 Hillsborough B M Active Middle 250

6 Hillsborough B M Active High 700

7 Hillsborough B F Slow Elementary 150

8 Hillsborough B F Slow Middle 1150

9 Hillsborough B F Slow High 2350

10 Hillsborough B F Active Elementary 450

11 Hillsborough B F Active Middle 550

12 Hillsborough B F Active High 850

Print the first 40 observations.

In addition, you must answer the following questions, once you have converted the data into a flat file. All of the analyses can be performed using PROC MEANS.

1)How many total absences did each school district have?

2)Who had more total absences, boys or girls?

3)In the Sarasota school district, what grade level missed the most days of school, elementary, middle, or high schools?

Submission procedure:Please submit the SAS program.

Hints:

  • Why are we looking for 144 observations in our final dataset – how many cells (in gray) are there in the original table
  • Remember that _n_ can control observations (rows)
  • Remember that arrays can control variables (columns)
  • Be patient – not an easy project!

Skills developed:

  • Using _n_ and arrays to reorganize data from complex table to “flat file” ready for analysis

1