### Apr

#### 8

The first cool thing you should know about Dr. Patricia Berglund is that she and several others put their slides and more up at the SAS Global Forum take-out section. That is NOT, contrary to what you might believe, a place where you can pick up some really good Chinese food to eat while listening to the sessions. Whether or not that would be a good idea is a different issue.

No, au contraire, this is a section where people out of the goodness of their hearts put their slides up, and more, so if you could not attend the conference, or you want to review the material, well, there you have it. For example, Dr. Berglund’s presentation on survival analysis is right here.

One might wonder whether this would cut into conference attendance. I don’t think so, quite the opposite, in my opinion. If I see several really good presentations, I’m more likely to want to attend next year. The takeout section includes just a sample of what you could have seen, and a pretty representative sample. The statistics section is usually very good at this conference, but this year was even better than usual. So, if you see a dozen presentations and know there are 300 more where those came from, you might want to come. If you can’t come because your evil pointy-haired boss won’t approve your travel budget, then you can at least have some benefit from the takeout.

And if you did attend and want a review of a section you really liked, well, there it is.

So, assuming you did not follow that link and listen to the 43 minute video, here are a couple of points:

1. In survival analysis, time to event of interest is a major focus. This is unlike other methods like logistic regression where you are only interested in whether or not the event occurred.

2. The survival distribution function is the probability of survival.

3. The cumulative density function is the probability of the event occurring at or before the time, for example, the probability of death. Obviously, these two functions are going to be mirror images of each other.

4. The hazard function is the probability of an event occurring given that it hasn’t already occurred.

She did not give this example, but I was reminded of Sudden Infant Death Syndrome, which, if it is going to occur, generally happens under one year of age. I think I held my breath for the first twelve months of life for each of my children. You can imagine the hazard function being different for all sorts of things that are age dependent – for example, miscarriages tend to occur early in pregnancy and the older the fetus the less hazard of miscarriage. The whole hazard function concept is interesting to me but since this was not a one-day seminar, she moved on to …

PROC LIFETEST

Now here is the kind of off-label use of SAS procedures that I love. PROC LIFETEST does not currently allow accounting for complex samples. It does, however, provide nice descriptive survival curves, which you might like.

You can’t use a WEIGHT statement with PROC LIFETEST. You can, however, use a FREQ statement. Frequencies can only be integers, but weights are often NOT integers. So, what do you do?

The solution is obvious, really. Multiply your weights by 100 or 1,000 – whatever number you need to make these an integer. What you are interested in obtaining at this stage is the curve, and multiplying every variable by a constant is not going to change the shape of the curve one bit.

You can also use a STRATA statement in PROC LIFETEST, which she did, and produced curves by ethnicity.

Of course, if you don’t account for your sampling method, the standard errors are going to be incorrect, but since the point of this part of the analysis is simply descriptive, it doesn’t matter.

The world’s most spoiled thirteen-year-old has a friend whose parents are divorced and the mother now has a boyfriend. She commented to me,

“I think that is disgusting. People’s parents should not have sex in the house. They should have it somewhere else. Like Mexico.”

Since she is asleep, and I have been gone several days, even though there was a lot more really cool stuff that came up in this session about survival analysis, it will have to wait until tomorrow.

# Comments

**2 Responses to “Survival analysis, take-out and one smart cookie”**

**Leave a Reply**

You have a gift for taking a subject that only a rocket scientist can understand and making it interesting to normal nerds – like me. Thanks for posting.

Aw, thanks! I have to tell you, though, that sometimes those rocket scientists aren’t all they are cracked up to be. In the interest of domestic tranquility, I will not elaborate.