I am using the rms
package to draw a nomogram to represent a logistic regression model fit
.
ddist<-datadist(data)
options(datadist='ddist')
fit<-lrm(Outcome~Grade+CF+HF, x=TRUE, y=TRUE, data=data)
The model returns:
I plot the nomogram:
nom<-nomogram(fit, lp=FALSE)
print(nom)
I receive the following points for each level of my predictors:
My first question is about the point values assigned Grade
.
If I were drawing this nomogram by hand from the Beta coefficients in fit
, my highest B coefficient is -4.1537(Grade=3). The next highest B coefficient is 2.9472 (CF=20).
2.9472/4.1537=0.71. 71 is the point value is equal to CF 20. This matches the points on the nomogram. I've manually added the red line to this value on the nomogram above.
To calculate the next point value, I select the third highest B coefficient, -2.5917 (Grade=2).
-2.5917/-4.154=.624. Instead of 62 being assigned to the Grade=2, the nomogram is assigned 38. I do not understand how this value was assigned instead of 62.
Grade is a factor in my dataframe data
> str(Grade)
Factor w/ 3 levels "1","2","3": 2 2 2 2 3 2 2 1 2 1 ...
My second question is about the Total Points calculation of 220. If I select the predictor values with the highest possible points Grade 1+CF 20+ HF 4 (or 100+71+28) my total points would be 199. Why does the total points scale go to 220 when there is no combination of values that equal 220 points?
Thank you for any help. I appreciate your time.