Dear all
I have the following data set titled "EyeSurgery"
The data contains 3000 IDs of patients. The variables are listed below with an example of the first 5 rows.
ID LeftEyeangle RightEyeAngle LeftEyeSurgery RightEyeSurgery LeftTimeToOp RightTimeToOp
1 acute Neutral 1 0 8 -
2 acute acute 1 0 24 -
3 obtuse acute 1 1 15 38
4 obtuse neutral 0 1 18 19
5 neutral neutral 0 0 - -
I am trying to calculate/draw a patient-matched survival analysis curve of "Acute" vs "Obtuse" vs "Neutral" using Cox Proportional Hazards Model. As it is patient-matched(each patient has 2 eye angles), there will be multiple survival curves analysis as the analysis will have to be somehow split into 4 groups "Acute vs Neutral", "Obtuse vs Neutral" and "Acute vs Obtuse" and "Neutral vs Neutral".
My code is :
stset LeftTimeToOp RightTimeToOp, failure(LeftEyeSurgery==1, RightEyeSurgery==1)
stcox, estimate
But this does not seem to work
Would be incredibly grateful if anybody can assist with this issue? It may be a case of reorgansing the data but not sure how to run a mutiple variable survival analysis.
Many thanks in advance
Related Posts with Multiple cox regression models code
Getting the underlying data from LROCI have run a probit model and then used the command -lroc to draw a ROC curve. I want to extract the…
Herfindahl-Hirschman Index, command ignores existing valuesHello! I am a PhD student in International Business and Economics. I am studying MNEs. I would like…
Function to count categorical dataI have a database containing company names (company_name) and company countries of origin (company_o…
How to run the rank-based and sign-based variance-ratio test in stata?Hi. I want to test the random walk hypothesis by using rank-based and the sign-based variance-ratio …
Poisson pseudo maximum-likelihood in a Diff-in-Diff analysisHi Everyone, I am performing a Diff-in-diff analysis using an outcome with many zeros in the panel …
Subscribe to:
Post Comments (Atom)
0 Response to Multiple cox regression models code
Post a Comment