Dear stata listers
I'm using stata to analyse time-to-event data. Specifically, I'm trying to relate licensing data to merger and acquisition events in the bio-pharmaceutical industry.
To that aim, I use the Cox PH model, and I've managed to set up and analyse the data in stata (v 14.2) by means of the commands listed below - an excerpt of the datafile can be found in attachment.
The problem I'm facing is related to the analysis of a certain covariate, i.e. the total asset value of the licensees. This value is not constant and is dependent on the licensee.
My question is now: how to correctly implement this specific covariate in the existing Cox PH model.
I've searched in the internet but I haven't found a solution to this particular problem.
Any help/suggestions would be highly appreciated.
Many thanks in advance
Alex (stata 14.2) [ATTACH]temp_12751_1544367960848_705[/ATTACH]
PS In the dataset, I've already defined an additional ID (value) for each unique licensee (named: Licensee ID), the total asset value of the licensee is in a column named Licensee Total Assets (th USD).
*Define variables for Survival Analysis
global time Date
global event M_A
global id ID
global xlist LicenseCumulAll
gen PeriodStart = mdy(1, 1, 2000)
* Set data as survival time
stset $time, id($id) failure($event) origin(time PeriodStart) scale(365.25)
* Cox proportional hazard model
stcox $xlist, cluster(ID)
Related Posts with Cox proportional hazards model a non constant covariate
Getting only 1 variable when running estadd summ to save timeI am running Code: estadd summ, iqr But since there are lots of right-hand-side variables, and b…
Get R-squared measure from IVLASSOHello, I'm using IVLASSO command to estimate a model. Is it possible to get R-squared measure from …
Dotplot with multiple variablesHello, I am trying to create a way to display a data index I have created for coral rugosity (data …
How to generate percentages withing groups across yearsHello everyone, I am new to Stata and I need help regarding the code I can use for my question belo…
spmap lines not correctly sortedI have an odd problem with spmap. In some circumstances using the line() option the lines are not co…
Subscribe to:
Post Comments (Atom)
0 Response to Cox proportional hazards model a non constant covariate
Post a Comment