Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cox regression help - Stata error message

    Hi there, I am looking to perform a Cox regression model for a data set I am using. When I type in the command 'stset' in stata I get the error message 'data not st'. I've looked around and can't understand why this is occuring, so was wondering if anyone know why this occurs and how to solve it.

  • #2
    Your question is a bit unclear. If what you literally typed in was just -stset-, then "data not st" is exactly the response you should get. -stset- alone, with nothing else specified, asks Stata to report the survival-analysis related settings of the data set. If the data's survival-analysis settings have not yet been specified, then Stata just reports that fact.

    To use the -stset- command to actually set those settings, you have to specify them in your command. At a minimum this requires naming the survival time variable. And depending on your circumstances you may also need to specify a condition distinguishing failure from censoring, as well as other variables delimiting the time at risk, and a scale factor. Do read -help stset- and the PDF documentation linked there.

    Comment

    Working...
    X