I have panel data on companies and I'm interested in how several DVs and covariates impact the time until a company gets funded. My data (pandas Dataframe) looks something like that:

               DV1 ... DV5 CV1...CV12 Funding CompanyFounded
Company Period
A       1      0       0    5    4    False   False
B       1      0       0    5    6    False   False
A       2      0       0    5    4    False   False
B       2      3       5    5    6    False   True
A       45     1       2    5    4    False   True
B       45     534     42   5    6    True    True

Now I'd like to perform a survival analysis. I know that I could calculate averages and calculate the time to first funding using CoxPHFitter. But I did not find any model to fit panel data. Is there a workaround? I'm looking for something comparable to STATA's stcox command.

Thanks in advace!


lifelines has support for panel data using the CoxTimeVaryingFitter model: https://lifelines.readthedocs.io/en/latest/Time%20varying%20survival%20regression.html

  • $\begingroup$ @ Cam.Davidson.Pilon could you maybe have a look at the following question? $\endgroup$ – TiTo Jun 11 '20 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.