Saturday, March 1, 2008

SAS

I forgot to post yesterday. I got so caught up in the excitement of school that I neglected my blog. So what was I so excited about? This is the point where you will discover how lame I really am.

Let me set the scene a little. Some of you may remember the survey that I posted on my site many months ago. Fatty also posted it for me and I got a few other sites to post it. Anyway, lots of people took that survey (about 600 to be exact). I didn't realize it at the time, but the survey equipment that I was using didn't transfer very nicely to excel, so I had to do it manually. I'm thinking that took me 60 hours or more of the most tedious, boring data entry I have ever done. Finally, last weekend I got all my data into excel.

That was huge, I was really excited last weekend, so I went to my advisor and said, "What next?" He questioned what I had gotten myself into. The next step was to get the excel file ready to go into SAS which is really confusing statistical software. He wished me good luck and sent me away with a slight chuckle. I spent about 3-4 hours correcting my spreadsheet, preparing to send it to SAS. I was excited to give it a shot.

Let me explain SAS a little, I don't think you have a feel for it. It is not like Excel. Bill made Excel user friendly so that people would like using it. SAS is made for statisticians who know some computer programming in the SAS language. Statisticians are a unique breed. Computer programmers are also a unique breed. When you have to be both a statistician and a computer programmer to operate a computer program it means that you have to wear thick glasses, a pocket protector and a calculator mounted to your belt in order to operate SAS.

I've taken 1.5 classes that use SAS (and I have a calculator that I sometimes carry in my pocket and glasses that I wear on occasion) so I thought I would give it a shot. For the first 2 hours of trying to import my excel file into SAS I got nothing but errors that ended with "file import unsuccessful". That's OK because there are at least 14 ways to do any given task in SAS, so I moved on to the other way that I knew. After about 3 hours of trying, I finally got data from Excel into SAS.

Unfortunately I had gone from 580 subjects to 193. The data also didn't line up anymore. I had a column of data that was supposed to be how many times a week the person commuted by bike (should have been a number between 0 and 5) and then I'd have a list of data such as: married, full time work, 2, 1000, mountain, road, female. So somewhere along the way my data got all mixed up. I spent a couple more hours trying to figure out how to straighten my data out so that the columns were all the same type of data.

Finally I gave in and made an appointment to talk to my advisor again. I told him the problem and he laughed at me. He told stories of data sets that had taken hundreds of hours to get imported into SAS because of little errors that were difficult to find. But he was willing to give me 30 minutes.

My advisor gave me a third way of importing data into SAS and I tried that. It straightened things out considerably, but there were still some areas where things weren't right. Then I found it. A space between city and center in the question about where the person lived. I took it out and suddenly everything was lined up.

So that is why I didn't write yesterday, I was excited to finally have data to analyze. That was not a simple process, nor was it a simple excuse for not writing. Using SAS really increases my motivation to simplify!