Wednesday, December 9, 2009

Snow Day

If you're living in Wisconsin, you know that today, December 9th, is a snow day. It has snowed over 14 inches in the past day, schools are canceled, and even business days have been canceled. My family stayed home today.

For a very short time, we went outside. My son, Luca has been quite entranced by the snow, staring out the window without any attention for anything else. When we went out, it was a bit difficult for him to move around with all of the winter cloths and all the snow. I thought it would be funny to stick him in the snow drift and take a picture. My wife, Kyra, said the tree near our home would be perfect for the scene:


Luca tried to crawl out of his snow trap... He ended up going face first into the snow right after this shot. We went inside right after that!


We were quite bored inside all morning, so after we came back inside, Kyra suggested that Luca and I play with some shaving cream. I guess he's done this at preschool before, and it sounded like a fun activity to keep him occupied. I spread shaving cream on the dining room table and he went to town. I thought it was quite amusing, so I spread some shaving cream in his hair. When I did that he smeared it all over his face...


We hope the snow will clear up soon, so we can get back to work and our normal lives! Stay safe everyone!

Wednesday, September 16, 2009

Colors in the SAS Log

Today I was writing a SAS program, and I wanted a statement I was writing to the log to appear in a different color, so the user could find the information easily by scanning the log. My supervisor wrote a macro program that output a note at the end that appeared red in the log. So I looked up the program to see how he did it.

To my surprise, the macro program uses a simple %put statement with the word ERROR at the beginning, followed immediately by a dash (-). The dash removes the word "ERROR" from the log, replacing it with 5 spaces. This is apparently a default function in SAS. He also added a %str statement inside the word ERROR to break it up, so users do not see the word "ERROR" when the program is included in another program and the user searches the log for errors. Here is the code:

%put ER%str(ROR-) Here is text in red!;

This technique can also be used for the keywords WARNING and NOTE:

%put WA%str(RNING-) Here is text in green!;

%put NO%str(TE-) Here is text in blue!;

Note that the placement of %str() is arbitrary. It could just as well be "%str(W)ARNING-". Keep in mind that the end result is also indented the length of the key word, with blue being the shortest and green being the longest indent. Furthermore, there isn't much point in removing the word "NOTE" since it is generally not associated with error messages.

In the end, only four colors can be used in the log: the default black, red, green, and blue. Blue is the easiest to use, since the key word NOTE does not need to be removed. Having red and green also available, though, is definitely better than nothing!

Tuesday, July 28, 2009

IBM Buys SPSS & SPSS vs SAS

Announced earlier today, IBM is to buy SPSS, the statistical and predictive modeling software and competitor with SAS. (More news articles.)

I used SPSS at my last job, and I liked it quite a bit. There were certain tasks that were much easier using the windowing interface, and SAS's code-only method just doesn't quite match that. For example, transposing a dataset in SAS is not very intuitive. In SPSS, however, the wizard explains which variables to choose for identification of variables, constants, and variables to transpose.

Then on the other hand, SAS is quite powerful and is capable of a lot more than SPSS. Perhaps SPSS's code module can be used in a similar way, but when I used it, it was rather annoying. If you need to use a dataset, it required it to be open. In SAS, you don't ever have to open a dataset, unless you need to figure out what the variables are like. Then again, you can just look at the column information in the context menu. SAS flows from one dataset to another, and there's no need for the dataset to pop-up when using it.

SPSS was much better at handling variables (columns). Variables could be easily changed from one type to another, and "labels" for particular variables could be applied. For example, 1 = Low, 2 = Medium, and 3 = High. This can be accomplished in SAS with formats, but it's not quite the same, as it requires the user to apply the format. SPSS was also quite useful for turning a variable into a category or a variable with ranges; for example, converting salaries into salary ranges. A window wizard helped with that too.

At any rate, it will be interesting to see what happens in this market now that IBM is going to own SPSS. I always thought SPSS and SAS joined together would be a really great product, and perhaps IBM will bring to SPSS more SAS-like capabilities. Who knows?

More comparisons of SPSS and SAS:

Saturday, July 4, 2009

Bank Advice to Couples

Recently, my bank, the UW Credit Union, published an article on the website about "Five Common Money Mistakes Made by Couples." Here is the list in short form:
  1. Know where your money goes and have a budget.
  2. Share financial responsibility.
  3. Don't keep money secrets from each other.
  4. Don't marry your debt.
  5. Plan ahead.
The bank recommends using a budget worksheet, but I would argue in favor of budgeting software, or better yet, an online service like Mint.com. Mint is a great way to track expeditures, and any software package would pick out items you wouldn't think of putting on a budget. For example, you may have no idea how many times you actually stop for coffee on the way to work and how quickly that adds up. It's quite a bit, week after week!

The other points were great, if not somewhat obvious. Of course it's best to make decisions together and not retain secrets, unless of course, some money is set aside for a gift. Keeping major financial secrets is a quick way to lead to arguments or a lot of stress for a spouse should something happen to the other.

The fourth item about not "marrying your debt" pointed out that it's not best to merge debt. As many people have students loans, it may be tempting to put all the debt together. However, this can harm one or the other spouse's credit. Consolidation may save money on monthly payments, but it could make it harder to get a loan. It also reminds me of that commercial with the guy singing about his new wife who had a bad credit score and they couldn't get a home loan because of it. At the end, he sings something like, "I’d be a happy bachelor with a dog and a yard." That's no way to start a marriage!

The last point about planning ahead also noted that it's good to have about six months in savings ready for any disaster. While that sounds great, I don't think anyone in middle America is doing that. It's been said that we spend $1.01 for ever $1.00 we earn, so it's going to be difficult to change the culture to turn that around. Of course, it's best to try!

Saturday, June 20, 2009

HEDIS 2009 Complete

We just completed HEDIS 2009!

For those of you who don't know what HEDIS is, the acronym stands for Health Plan Employer Data and Information Set. In order to obtain accreditation from the National Committee for Quality Assurance, health plans must analyze their health care data to generate percentages related to the quality of care provided by the health care providers. The data is used to compare health plans and provide information about where health care can be improved, for the health plans specifically and for our nation in general.

An easy is example of a HEDIS measure is the percent of pregnant women who obtain the recommended number of prenatal visits before giving birth. This percent is part of the FPC measure (Frequency of Ongoing Prenatal Care). Another example is the percent of children who obtain the recommended vaccinations at specific times during their development. This comprises the CIS measure (Childhood Immunization Status). More complex measures, such as CDC or the set of RRU measures, measure the quality of care for diabetics or the cost of care for specific disorders across the health plan (respectively).

Toward the end of HEDIS, I invented a couple of new words related to the process:
  • HEDISache - A headache brought on by working on HEDIS.
  • THEDIS - Pronounced tuh-he-dis. Alternatively, THEDIouS, pronounced tuh-he-di-ous. - An adjective describing what it's like to review HEDIS data: tedious.
  • HEDIlunch - Lunch with other people who worked on HEDIS, usually after successful completion.
I also see a car with the license plate "PBH" on my way home from work just about every day. It reminds me of the measure, "Persistence of Beta-blocker Treatment After a Heart Attack." Each measure has a three-letter acronym, and this one is abbreviated PBH. My wife rolls her eyes whenever I recite the name after seeing the license plate. I guess I"ll remember that one for a while!

Update: I noted the wrong pregnancy measure, PPC, instead of FPC. It is now correct.

Thursday, May 14, 2009

AHIP Insurance Course

Last week, I completed an introduction to insurance course, Fundamentals of Health Insurance - Part A (Basics of Health Insurance), offered by AHIP, America's Health Insurance Plans, a coalition of health insurance companies. I had decided to take the course online to save paper and money. To prepare for the exam, I studied for a couple of hours every night last week. I had already read all of the material, but it was quite a bit of information to remember, so I was reviewing it and going through the study guide. I took the test Friday and passed. However, I wasn't offered the opportunity to offer any feedback on the course, so I would like to here.

First, I had a number of problems accessing the presentation online. When I would try to load the presentation in Firefox, I received an error message from Java. I tried it on Internet Explorer and received the same message. I checked my version of Java, and it appeared to be up-to-date. I also check my security settings in both Firefox and Internet Explorer. Nothing seemed to be blocking it. I also checked my firewall, but since I was in a hurry, I didn't check it thoroughly. So then I tried my wife's laptop, which is less secure than my desktop PC in terms of browser security and firewall settings, and it worked. I studied using her computer for a few weeks until I had some time to investigate issues on my PC. Finally, I manually updated Java and changed my firewall settings to asked about network connections. It turned out that the Java applet AHIP was using was out-of-date, and I had to allow an exception. I'm not sure if the update or the firewall change resolved the issue, but it worked on my PC.

The presentation itself was also problematic. The data presented was out-of-date by at least 10 years, as the presentation only included data up to the 90s. It appeared that many of the terms, definitions, and trends were also quite out-of-date. The presentation also included a number of "Knowledge Checks" to see if you were understanding the material. About 90% of the time, these questions were completely irrelevant to the material. At first I thought they were from a different chapter, but now that I've finished reading the material, I don't think they were even from the right course. The answers to the questions were not provided in ANY of the material. Fortunately, these questions were only intended to help the student study and did not count toward the final grade. I'm not even sure AHIP even kept track of the answers.

I had contacted AHIP about both problems - with access and the questions - however, they were not much help. The guidance on updating my PC did not help, nor did the tip that "these intermediary quizzes are not graded" - basically saying "skip them". Open the following link to view the email conversation with the AHIP representative:

http://docs.google.com/Doc?id=dff94k46_67gdnxhwhn

At any rate, I was able to overcome these issues, study the material, and pass the test. There were issues with the test, too. The location for accessing the test was oddly placed at the end of the presenation content. If you clicked on it before you were ready or before your test time, that took up 1 of 2 test opportunities, since it would load the official test. I heard a number of people saying they accidentally clicked on it or expected it to be a practice test. This seems to be a bit of poor design.

The test format was a bit odd. It consisted of a number of frames with the browser, with a convenient clock counting down the time left for the test. The questions were multiple choice, but included poorly-written answers like 1) A and B; 2) B and C; 3) A, B, and C; 4) Only A; 5) Only C. These types of questions do not really increase the ability of the test to distinguish between those test-takers who know the material and those who do not. Simpler questions with 3 or 4 clear choices for responses would be adequate.

Some features were actually very convenient, helping the test-taker. One was the "Review" button, which once pressed would flag the question and put it on a list for you to answer later. The other was the button that showed the list of questions to review. The next button, as I heard from a colleague, changed from "Next" to "Submit" on the last question, which is not good if you're not paying attention to the number of questions you've answered. She clicked Submit by accident, without reviewing the questions she had flagged, and as a result, failed the test. Once I completed the test, a list of the questions I answered correctly appeared. Apparently there was a link at the bottom that showed the total percent correct, but I did not see it. I clicked the "Home" button to check to see if I passed the test. When I went back, it did not load the test results. I suppose it was a safety mechanism so that the user does not overwrite a test that was just taken, which would not be good, especially if the taker passes it the first time and fails it the second.

Although all of these problems were present, I did learn quite a bit. The course had a lot of good information about how the insurance industry works and huge number of common terms and definitions. There was some information I did not find as relevant, for example, commissions for agents/brokers, but it would certainly be useful for someone in those fields or working with those fields. I heard feedback from my co-workers that sounded similar to my experiences, but I found that a lot of people order the books. I feel that's a bit wasteful; however, it would have avoided the problems with the online presentation and questions. In the end, the information I learned was very useful, but the presentation could have been better. I hope AHIP reviews the presentation and content and updates the content to include new data and up-to-date definitions.

Saturday, April 25, 2009

Internet Explorer 6 at Work

At my last and current job, my computers have been set up with Internet Explorer 6 as the default browser, even though Microsoft has developed Internet Explorer 7 and version 8, not to mention the flourish of alternative browsers, like Firefox, Safari, and Google Chrome, to mention only a few.

I've noticed that the possible reason for this may be legacy software, software that may exploit some security hole in Internet Explorer 6 in order to operate. At my last job, I downloaded Internet Explorer 7 because I thought it would be more secure while I was performing research. (At my new job, the IT department is much more serious about security, since the company deals with health care data. I am unable to modify much of anything. My screen resolution isn't even permanent!)

When I tried to access one of the company's intranet pages for storing customer information, I received numerous errors while trying to use some of the features. I tried lowering the security settings, updating all sorts of related software, and modifying the connection settings, all to no avail. It just wasn't going to work on Internet Explorer 7.

The software has some serious flaws - it's number 8 on the worst tech products of all time rated by PCWorld and the Computer Emergency Response Team has recommended that internet users not use it at all. So I'm wondering, with all of the security flaws and out-of-date features, why do companies still use it? Do newer versions lack compatibility with legacy software? Is it too difficult and time-consuming to convert to the newest version? Is it easier just to wait until Vista is the defacto operating system for business PCs? What is the reason?

Update: One of my co-workers had IE 8 installed. It was an attempt to help a web interface work better, and it seemed to do the trick! Lesson: Upgrade!

Monday, April 20, 2009

Proc SQL

Today at work, the following conversation took place:

Me: A watched proc SQL never quits.
Supervisor: Or worse, generates errors!

(Note: Proc SQL is procedure for using SQL in SAS.)

Friday, April 10, 2009

Are You Sure - SAS Code

Update on May 20, 2009: Users may wish to add "memtype=data" option to the proc datasets statement to drop only SAS tables (see below). I believe the proc datasets procedure will delete formats and possibly other types of data.

Today I wrote a macro program in SAS to delete all of the contents of a specified library. I programmed a pop-up window to ask the user if they really want to delete everything. Here's the code:

%macro DeleteLib(lib);

%let rusure=N;

/* Pop up a window to ask a question */
%window surewin
#1 @20 "DELETING ALL TABLES!"
#3 @20 "ALL TABLES WILL BE DELETED FROM &lib"
// @20 "Are you sure you would like to delete all tables from &lib?"
@81 rusure 1 attr=rev_video required=yes " (Y/N)"
// @20 "HIT THE ENTER KEY TO CONTINUE"
%display surewin delete;

%put rusure=&rusure;

/* Delete all tables if Yes */
%if &rusure=Y %then %do;

data dummy;
run;

proc datasets library=&lib memtype=data;
save dummy;
quit;

proc sql;
drop table &lib..dummy;
quit;

%put NOTE: All tables have been deleted from &lib.;

%end;

/* Put a comment if No */
%if &rusure=N %then %do;

%put NOTE: No tables have been deleted.;

%end;

%mend DeleteLib;


The first and last line are the beginning and end of the macro program. The second line sets the variable "rusure" (that is, "Are you sure?") to "N" for "No" by default. The next block creates the window and pops it up. In the window the user can specify "Y" or "N" to specify whether to delete the library (think of it as a folder or directory with SAS datasets in it). (The code uses a macro variable "&lib" to insert the name of the library.) If "Y", then the code creates a dummy dataset with nothing in it, runs a program that keeps only the dummy dataset and delete everything else, then it drops the dummy dataset and puts a note in the log. If "N", then it just puts a note in the log.

At first I thought of putting another set of code in there as a double-check: An additional window asking "Are you REALLY sure you want to delete the library?" then running another Y/N if statement. But then I thought that might be a little annoying to have to deal with so many windows.

It would have been a funny April Fool's joke to insert a series of windows into someone's program asking, "Do you want to run this program?", "Are you sure you want to run this program?", "Are you REALLY sure?", "REALLY, REALLY sure?", "Wouldn't you rather run another program?". The user would have to keep hitting Y or N over and over again to get it to work. It would be easy to insert a small line of code referencing another piece of code using a %include statement (for example, %include "c:\AprilFools\rusure.sas";). A trickster could even hide the code after a line of spaces far to the right of the window where no one would find it.

If anyone tries that, let me know what happens!

Saturday, April 4, 2009

Keyboard Shortcuts

I love keyboard shortcuts. There's no better way to do things quickly than by using a keyboard. If you think about it, using all fingers instead of moving your hand/arm and clicking with one finger must be faster. But first you need to know the shortcuts. Here's a list of some good resources for keyboard shortcuts in various programs:
  1. Windows XP
  2. Windows Vista (Remote Desktop)
  3. Firefox
  4. Microsoft Excel (Others)
  5. Microsoft Outlook
  6. SAS
Here are some of my favorite shortcuts--ones that people don't usually know about. These are based in Microsoft Windows XP.
  1. Alt+Tab for switching programs. Ctrl+Tab for switching tabs in Firefox or other tabbed programs. Alt+Page Up or Page Down is incredibly useful on remote desktops for switching between programs just like Alt+Tab.
  2. Ctrl+Shift+Esc brings up Windows Task Manager. Similarly, Windows+Break brings up the System Properties. The usual Windows combinations are good, too, especially Windows+L, which locks the computer, Windows+D, which shows the desktop, and Windows+E, which opens Explorer.
  3. Alt+F4 terminates a program. In some programs Ctrl+F4 terminates a window, submenu, or other child program within a program. I like to use that in SAS quite a bit. Ctrl+Shift+T opens a new tab in Firefox, and Ctrl+W closes tabs in Firefox.
  4. Keyboard shortcuts can be assigned to shortcut icons. At home and work, I use the Ctrl+Alt+Shift combination for typical programs. I usually assign Ctrl+Alt+Shift+W for Microsoft Word, Ctrl+Alt+Shift+X for Excel, Ctrl+Alt+Shift+N for Notepad, and Ctrl+Alt+Shift+C for Calculator.
  5. At work, I use the Ctrl+Alt combination for connecting to various programs that allow me access to something, for example, Ctrl+Alt+S for connecting to SAS, Ctrl+Alt+R for connecting to remote desktops, and Ctrl+Alt+Q for Rapid SQL.
  6. In Excel, Ctrl+; enters the current date and Ctrl+: enters the current time. Ctrl+" copies the cell above to the selected cell and Ctrl+' copies a formula in the same manner. Alt+Enter inserts a line break within a cell, allowing the user to break text across more than one line. Ctrl+Home, Ctrl+End, Ctrl+Page Up, and Ctrl+Page Down are useful navigational keyboard shortcuts in Excel, too. Try them out!
  7. In Microsoft Office, Ctrl+K creates a hyperlink on the selected text.
  8. In Microsoft Outlook, Ctrl+D deletes highlighted or currently viewed mail. Ctrl+Shift+V brings up a menu to move currently highlighted/viewed mail to a folder. Alt+F4, like above, terminates the current open message (I thought Ctrl+F4 would make more sense).
  9. In SAS, the best one to know is F9. Then you can read about all of them! Otherwise, F8 for submitting programs, F6 for viewing the log, F7 for viewing output, and F5 for viewing programs. Keep pressing F5 to toggle between multiple programs.
  10. If the Language Bar toolbar is on in Windows, don't hit Alt+Shift. It switches the language! That one gets me all the time, since my wife uses Chinese on our computer on occasion. And for some reason I bump it quite often.
That's about all I can think of right now. I like learning new keyboard shortcuts, and I know there are a lot more to learn. What are your favorites?

Monday, March 30, 2009

Funny Quote from Former Job

A while ago I found this odd quote from a research paper. Here's the quote (emphasis added):
Online courses provide scheduling flexibility to students facing scheduling conflicts. Also, they afford opportunities to at-risk students, elite athletes and performers, dropouts, migrant youth, pregnant or incarcerated students, and students who are homebound due to illness or injury or homeschooled, allowing them to study outside the classroom. (Watson, 2007)
Why on earth would a someone write a sentence linking pregnant and incarcerated students? I realize it says "or," but it's still just a bit strange to grammatically combine these two types of students. There are other students listed, so why not separate them? Is there something similar about being pregnant and incarcerated?

Saturday, March 28, 2009

My Tax Man

Instead of hiring a tax agent or using software, we decided to put our little boy, Luca, to work. Here he is, trying to figure out our deductions:


"You want ME to do your taxes?!"


"How on Earth do you organize your receipts??"

Actually, we used TaxCut Online to do our taxes. I'm sure Luca would have done a great job, though. He did seem awfully interested in my W-2s while I was working on it. Maybe he just wanted to eat them though.

TaxCut Online worked very well. For basic tax needs, it's quick and reliable. I spent about 2 hours working on it, and if there hadn't been a slightly confusing question about the Alternative Minimum Tax in Wisconsin, it probably would have been faster. Oh, and it would have been faster had I not been trying to complete it with my son on my lap, who likes to hit the mouse and keyboard! I also cleared my cookies on accident and had to log back in. Oops!

I used the software last year and it went very smoothly this year with the addition of my wife's tax information and our new deductions for our son. The software remembers data entered from the previous year and restores specific answers from last year's return for review. It does not allow a direct import of last year's data without review as a safety mechanism.

All in all, I could probably have saved a buck and done it on my own for the State and Federal taxes, but having the software to check over your work and the addition of on-demand support and assistance in case of an audit is a definite plus. Last year I did both TaxCut and the free State submission form, and I discovered that there was a difference in the return that was exactly the amount I paid for use of the software. There is a discout for tax preparation that TaxCut submits with you taxes!

Submitting taxes online is also incredibly fast. We received our State return in less than a week and our Federal return will arrive 9 days after I submitted it. Overall, I would definitely recommend this software to anyone willing to submit your tax information on the internet. Of course, if you have a complicated tax return, a professional is always the best and safest bet.

Sunday, March 22, 2009

My Home Computer Desk

I have a bit of an unusual work space for my computer at home. On the right of the keyboard, I have a trackball mouse. On the left, I have a regular mouse that is not used for moving the cursor. I also have a wireless mouse on the monitor area of the desk and a video game controller. Here's a photo:

The trackball mouse aids with avoiding carpal tunnel syndrome and it saves space. The small left button is set to the middle button and the small right button is set to "Back" for internet and file browsing. The mouse on the left side serves two purposes: First, this style of mouse has a better scroll device than the trackball mouse, which doesn't really have one. Second, if it's ever necessary to get the precision of a regular mouse (editing images, for example), then it is available for use. The laser is currently covered with a small sticky pad to avoid any cursor movement from it. The wireless mouse is used for viewing the computer desktop on the TV, away from the computer monitor. It's great when watching internet TV shows on an actual TV (hulu.com is great for internet TV).

Also note the USB extension cord, which is useful for any other peripheral devices one would need to plug in temporarily (a camera, for example), and the wireless headphones, which allow for freedom of movement and less cord clutter. The small device under the monitor is a CRYPTOCard, used for accessing remote computers at work. The monitor is on a base that rotates and adjusts vertically, making it perfect for getting just the right position for the user. The combination of the trackball mouse and vertically adjustable monitor have significantly improved the ergonomics of my computer desk, making me a lot more comfortable, especially during long hours of work (or play!).

Here's an older version of the setup with an older left mouse and keyboard and without the wireless mouse.

I (thankfully) upgraded the monitor from the bulky, unadjustable CRT monitor. Since I spilled juice on the keyboard (not recommended!) I had to get a new one of those too, although I went with a cheap keyboard. Actually, the only component I would change about the current setup is the keyboard, which isn't exactly comfortable and the extra buttons on the left and right sides are not prominent enough to be very useful. I liked my old one, but I spilled juice on it...

By the way, all of these devices except the keyboard are from Logitech. I really like their computer input devices. The software isn't completely bug free, but once I got the settings where I like them everything works just fine. I haven't used the wireless mouse as much, but I advise getting a USB extension cord with it, as its range is limited.