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
Loosing data on mergeI am merging 2 data sets, in master data set, the variables are byte with no data, and in the using …
looking at the mean of one variable across another variableWithin stata i have data on the consumption of 10 different alcohol types. Another variable is the r…
Longitudinal administrative health data - flag claimants who received the same treatment accross all observationsGreetings, I have a longitudinal administrative health dataset consisting of over 400,000 observati…
Handling of missing quality information in admetanHi David, When I run the QE model in admetan with missing quality information it still runs and pro…
XTSUM2DOCX: Report summary statistics of panel data to a Word tableDear all, The user-written Stata command xtsum2docx is now available on SSC, thanks to Professor Ch…
Subscribe to:
Post Comments (Atom)
0 Response to 10-year probabilities after stcrreg
Post a Comment