Teach you how to use stata as a competitive risk model

In the last issue, we have introduced how to use R language to make a competitive risk model. Today we will demonstrate how to use stata to make a competitive risk model. The advantage of stata over R language is that the operation is relatively simple, and most of the functions can be accessed through the interface. The disadvantage is that the interface is not flexible enough relative to the code, but it is suitable for beginners. We continue to use the last bladder cancer bladder1 data set to make a competitive risk model, so that we can compare the results made by stata and the R language.
First open stata to import the data. Our data is not very large, so I will copy and paste it directly. The following is the format of the
data. The name of the data is explained as:
id: patient number; treatment (treatment plan): 1. placebo 2. Vitamin B6. 3. Thiotepa;
number: the initial number of tumors size: the largest initial tumor size (cm) recur: the number of recurrences
start, stop: start, stop: the start and end time of each time interval status (outcome) 1. Survival 2. Recurrence 3. Death rtumor: The number of tumors found at recurrence rsize: The largest tumor size at recurrence
Insert picture description here
As shown by the arrow in the figure below, click the red arrow menu to
Insert picture description here
open the menu as shown in the figure below, click the red arrow
Insert picture description here
Then fill in the time variables and outcome variables
Insert picture description here
as shown in the figure below, and click OK . As shown in the figure below, fill in the covariates and competition time in turn, and click OK. The
Insert picture description here
result will come out.
Insert picture description here
You can also enter the code to make a picture. The picture can also be modified and beautified. Add credible interval etc.

stcurve, cif at1(treatment=0) at2(treatment=1) at3(treatment=3)

Insert picture description here
It can be seen from the figure that the three treatment methods have no difference in the patient's tumor recurrence.
Add a few more covariates and click OK
Insert picture description here
. The result shown in the figure below is exactly the same as that made by R language.
Insert picture description here
Stata's competitive risk model is very simple, and almost no What code is needed, very suitable for beginners.
You can also make a nomogram through stata. I won’t talk about it here. Those who are interested can follow my scientific research tutorial.
Insert picture description here

Guess you like

Origin blog.csdn.net/dege857/article/details/112706552