I have developed a risk prediction model for Outcome (binary) based on 4 binary variables. I developed this on 70% of my dataset and kept 30% as the validation set (included below). AUROC was >0.8 and GOF was non-significant with good sensitivity and specificity.
Is there a way to calculate the OR of having just any one risk factor (bil/alp/ggt/CBDD) and then 2 risk factors, 3 risk factors, 4 risk factors?
logistic Outcome bil alp ggt CBDD
lroc
lsens
estat gof, group (10)
estat class, cutoff(0.2)
nomolog
I performed nomolog to get a graphical representation of the model and to be able to manually calculate for any individual but what I would like to say is your OR of Outcome is x if you have any one risk factor, x if you have 2 risk factors etc.
I would also like to plot predicted vs observed Outcome for my validation cohort using the model above if possible.
I tried the following for this but the output made sense (presumably because I have binary outcome??):
logistic Outcome bil alp ggt CBDD
predict predvar
predict resid, residuals
scatter resid predvar
Many thanks in advance,
Carla
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte CBDD float(bil alp alt ggt) byte outcome 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 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