Announcement

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

  • Setting up data for survival analysis with time-varying covariates

    I am planning to make an analysis of the survival of political parties using both time-varying and time-invarying covariates, but I am not sure how to set up the data-sheet. I have entered the data for the cases (individual parties) and time-invariant variables, but at a very practical level, I am not sure how to enter the data that varies over time. Could someone tell me where I find a simple straightforward description of how the data-sheet should be organized?

    Best, Carina

  • #2
    You don't say whether your survival time data are to be considered discrete or continuous, though I suspect it's the former in your case. Whatever, you need to read up in any standard survival analysis resource about "episode splitting". Freely downloadable resources include those at: https://www.iser.essex.ac.uk/resourc...sis-with-stata (for both types of data). If your survival times are to be treated as continuous, please read the [ST] Stata manual on the same topic.

    Comment


    • #3
      In particular, lesson 3: Preparing survival time data for analysis and estimation is helpful. Thanks for the link Prof. Jenkins.

      Comment


      • #4
        Dear Prof. Jenkins. Thank you very much for your answer. Yes, it is discrete data. I will read through your materials! Best, Carina

        Comment


        • #5
          It seems that I have a very similar issue. I read Prof. Jenkin's lesson 3, but my data set seems quite different.

          I am planning to make a survival analysis (EHA, Cox model) to predict the adoption of one particular policy and I do not know whether my data set is set up appropriately to handle both Time-Varying and Time-Invariant Covariates (TVCs and TICs). If I command “Stcox [varlist]” on a dataset that has both TVCs and TICs, I am afraid that Stata will be calculating the model as if all covariates were TICs, am I right?
          I have declared my data as Survival Time data, the time variable corresponds to the years 1996-2011, with “multiple record id variable” (corresponding to the 50 states) checked, and the failure variable corresponds to whether the state adopted or not the policy.
          For my data set I collected annual data (1996-2011) for independent variables (IV) for each one of the 50 US American States. Most of the IVs vary annually, and I guess this makes them Time-Varying Covariates (TVCs). My DV is binary (1=state adopted the policy, 0 otherwise; only one failure is possible)
          34 states did not adopt the policy in the time span and are, thus, right censored.

          The strategy that I followed to create this first data set (I had no previous experience with Stata nor EHA) was to make it as similar as possible to data sets that authors who investigated the adoption of other policies shared with me.

          Victor Cruz

          Comment


          • #6
            Victor: see my reponse to your other post on very closely-related matters. Be careful not to mix up threads.

            Comment

            Working...
            X