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
Find matched firmsHello everyone, Hope everything is going well. I have a question about how to identify the matched…
how to Import many excel files with multiple sheets and appending each sheet into one dta file for each file with the same excel file nameHello everyone, I just joined Statalist. So this is my first post. I would like to give you a brie…
RecodingHello, I have the variable gender which was originally coded as 1 = male and 2 = female. I went in …
Backward Compatibility .mlib-s Complied in v17Hi All, Yesterday a user made an issue on the -domin- (SSC) package's GitHub page noting that they …
Is there any way to stop pyStata while running?We know that both python and Stata have the stop-process capability, but it seems impossible to do t…
Subscribe to:
Post Comments (Atom)
0 Response to Cox proportional hazards model a non constant covariate
Post a Comment