Dear all,
I would like to calculate the 10-year risk of stroke for each individual in my dataset, given a set of covariates.
I am having troubles estimating 10-year individual risks based on a Fine and Gray model.
For a Cox model, I calculate 10-year risk using the following commands:
stset studytime, failure(stroke=1)
stcox age BP sm
predict double xb, xb
predict double basesurv, basesurv
sum basesurv if _t<10
scalar base10y=r(min)
gen risk10y=1 - base10y^exp(xb)
replace risk10y=risk10y*100
Now the question is, how can I calculate the 10-year risks of each individual in my dataset after running a Fine and Gray model?
stcrreg age BP sm, compete(stroke_compete=2)
I would very much appreciate your thoughts.
Best,
John
Related Posts with 10-year probabilities after stcrreg
Counting groups that have duplicate set of values within a variableThe structure of my data for this task includes two variables of interest: GroupID and Name: Grou…
Creating a new data set (monthly to yearly)My monthly data set looks like the following. Code: +---------------------------------------+ | …
How can I copy values for a variable to other observations within the same variable?Hello, I have a similar question as in https://www.statalist.org/forums/for...same-household which …
How to interpret results from xtreg difference in differencesHi- This is my first time posting. I have read a number of super helpful posts (thank you Clyde Sch…
Creating Bar Graph with LineDear all, I was wondering if there is someone who can help me with regards to my bar graph. With th…
Subscribe to:
Post Comments (Atom)
0 Response to 10-year probabilities after stcrreg
Post a Comment