I want to calculate the sensitivity and specificity of a diagnostic test for TB. The index test is a numerical variable TBscore with values ranging from 0.86 to 100. However, I also want to adjust for age, sex, cough and BMI, and I have decided to use logistic regression as below
logistic TBDisease TBscore age sex cough bmi
predict p if e(sample), p
roctab TBDisease p, detail
I then get the output below
Detailed report of Sensitivity and Specificity
------------------------------------------------------------------------------
Correctly
Cutpoint Sensitivity Specificity Classified LR+ LR-
------------------------------------------------------------------------------
( >= 1.46e-10 ) 100.00% 0.00% 2.53% 1.0000
( >= 6.42e-08 ) 100.00% 0.04% 2.57% 1.0004 0.0000
( >= .0001824 ) 100.00% 0.07% 2.60% 1.0007 0.0000
( >= .0003155 ) 100.00% 0.11% 2.63% 1.0011 0.0000
( >= .0003179 ) 100.00% 0.14% 2.67% 1.0014 0.0000
( >= .0003397 ) 100.00% 0.18% 2.70% 1.0018 0.0000
( >= .000353 ) 100.00% 0.21% 2.74% 1.0021 0.0000
( >= .0003924 ) 100.00% 0.25% 2.77% 1.0025 0.0000
( >= .0004425 ) 100.00% 0.28% 2.81% 1.0028 0.0000
( >= .0004429 ) 100.00% 0.32% 2.84% 1.0032 0.0000
( >= .0004773 ) 100.00% 0.35% 2.87% 1.0035 0.0000
( >= .0004885 ) 100.00% 0.39% 2.91% 1.0039 0.0000
( >= .0005115 ) 100.00% 0.42% 2.94% 1.0042 0.0000
( >= .0005456 ) 100.00% 0.46% 2.98% 1.0046 0.0000
( >= .0005482 ) 100.00% 0.49% 3.01% 1.0049 0.0000
( >= .0005705 ) 100.00% 0.53% 3.04% 1.0053 0.0000
( >= .0005847 ) 100.00% 0.56% 3.08% 1.0056 0.0000
( >= .0005957 ) 100.00% 0.60% 3.11% 1.0060 0.0000
( >= .0006096 ) 100.00% 0.63% 3.15% 1.0064 0.0000
( >= .0006124 ) 100.00% 0.67% 3.18% 1.0067 0.0000
Question: How do I get the actual scores in the adjusted model (cut-point)? I want to know what value of the actual TB score each of these predicted values correspond to. I can get the values in the unadjusted model by simply using "roctab TBDisease TBScore, detail" but this wont give me the same AUC as well as sensitivity and specificity given by the adjusted model.Is there a way of back transforming the predicted values to the actual score. When I select the cut-off using the predicted values, I want to know what TB score values correspond to it.
Thanks
Humphrey
Related Posts with Predicted probabilities and actual values
Calibration of logistic regression on large dataset.Evaluating goodness-of-fit for a logistic regression model using the Hosmer-Lemeshow test is not rel…
Weak IV test postestimation test when using ivreghdfe command?Dear STATA community, I am hoping you can help me find a command I am looking for. My coauthor and …
Creating and storing residuals in a loop Code: forvalues y = 2015/2017 { // Define a for/next loop spanning years in sample …
Question about reghdfeCould you please answer my questions about reghdfe command? 1. When I conducted estimation using…
Can I use tssmooth for a fixed number of periods like a rolling forecast, safe the forecast t+5, then start in t+1, save forecast t+6...Hello everybody, I'm trying to forecast values for the strategy of companies. I have a panel datase…
Subscribe to:
Post Comments (Atom)
0 Response to Predicted probabilities and actual values
Post a Comment