Hi All,
I currently have a multivariate logistic regression model I was hoping to make a nomogram for using nomolog. I am familiar with the practice and concept of forcing the coefficients positive & rescaling for ease of calculation, but was unable to explain some of the following results:
Some example data:
Where AGE & DX_SYSTEMIC_STARTED_DAYS are continuous variables, while clinT and ordinal_cs4 are on an ordinal scale from 2-4 and 1-6, respectively.
Here the coefficient for clinT and AGE are both negative and forced positive, as expected. However, the nomolog command then generates this:

The scale for AGE is reversed as I would expect, however it would seem the entire relationship for clinT has now reversed (increasing clinT equates to greater probability of the outcome, rather than decrease as suggested by the original coefficient). I have attempted to do some hand calculations as described in Zlotnik's original Stata Journal publication, but can't seem to understand why this has happened.
Any thoughts or suggestions?
I currently have a multivariate logistic regression model I was hoping to make a nomogram for using nomolog. I am familiar with the practice and concept of forcing the coefficients positive & rescaling for ease of calculation, but was unable to explain some of the following results:
Some example data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte AGE int DX_SYSTEMIC_STARTED_DAYS float(clinT ordinal_cs4) 54 31 2 . 74 26 2 3 68 19 2 3 75 45 2 . 40 0 3 2 55 23 2 . 68 19 2 . 52 76 2 . 49 38 2 . 58 39 4 3 57 51 2 . 69 31 2 . 55 19 3 3 56 110 2 . 64 36 3 . 56 90 2 . 56 . 2 . 58 29 2 . 59 32 2 2 76 127 4 . 71 36 4 5 55 75 2 . 48 48 3 . 74 31 2 . 56 61 2 . 52 44 2 1 65 49 2 2 75 31 2 4 75 136 2 4 70 118 2 . 79 28 2 . 55 35 2 . 59 120 2 . 55 . 2 5 65 5 2 1 84 30 2 1 60 55 2 . 53 42 2 2 67 38 2 . 73 0 2 . 82 35 2 . 68 63 2 . 80 0 2 . 67 83 3 . 43 15 2 . 63 62 2 . 61 34 2 . 50 37 2 . 67 40 3 4 68 61 2 . end
Code:
xi: logit pNode AGE DX_SYSTEMIC_STARTED_DAYS clinT i.ordinal_cs4 if !train
i.ordinal_cs4 _Iordinal_c_1-6 (naturally coded; _Iordinal_c_1 omitted)
Iteration 0: log likelihood = -780.96033
Iteration 1: log likelihood = -703.61222
Iteration 2: log likelihood = -700.33612
Iteration 3: log likelihood = -700.32248
Iteration 4: log likelihood = -700.32248
Logistic regression Number of obs = 1308
LR chi2(8) = 161.28
Prob > chi2 = 0.0000
Log likelihood = -700.32248 Pseudo R2 = 0.1033
------------------------------------------------------------------------------------------
pNode | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------------------+----------------------------------------------------------------
AGE | -.014472 .0067211 -2.15 0.031 -.0276451 -.001299
DX_SYSTEMIC_STARTED_DAYS | .0044828 .0015963 2.81 0.005 .0013542 .0076114
clinT | -.4913036 .1132646 -4.34 0.000 -.7132981 -.269309
_Iordinal_c_2 | .7516683 .2548217 2.95 0.003 .252227 1.25111
_Iordinal_c_3 | 1.807911 .2343054 7.72 0.000 1.348681 2.267141
_Iordinal_c_4 | 1.974595 .2570716 7.68 0.000 1.470744 2.478446
_Iordinal_c_5 | 2.482771 .2639091 9.41 0.000 1.965519 3.000023
_Iordinal_c_6 | 2.908944 .5212255 5.58 0.000 1.88736 3.930527
_cons | -.5668194 .5348518 -1.06 0.289 -1.61511 .4814709
------------------------------------------------------------------------------------------
The scale for AGE is reversed as I would expect, however it would seem the entire relationship for clinT has now reversed (increasing clinT equates to greater probability of the outcome, rather than decrease as suggested by the original coefficient). I have attempted to do some hand calculations as described in Zlotnik's original Stata Journal publication, but can't seem to understand why this has happened.
Any thoughts or suggestions?
