From the course: Advanced and Specialized Statistics with Stata

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Survival analysis

Solution: Survival analysis - Stata Tutorial

From the course: Advanced and Specialized Statistics with Stata

Start my 1-month free trial

Solution: Survival analysis

(upbeat music) - [Instructor] Let's have a look at the solutions to the survival analysis challenges. The first challenge was to load and explore the cancer data, that comes attached with this session. Let's go ahead and do that. Use cancer. Next, let's describe this data using the describe command. Here we see that the dataset contains forty eight observations, and it has four variables. The variable appear to be related to a medical experiment that measures drug effectiveness and survival time. We have information on the study time, whether a person died, what kind of drug they took, and what their age was. Next, let's set the data to survival data, using the stset command. The variable died measures failure, so we need to include that in our option. stset studytime, failure is equal to died equals one. The data is now stset. There are forty eight observations. Of which thirty one ultimately fail.…

Contents