Tom Willems
2012-Sep-06 08:37 UTC
[R] Logit regression, I observed different results for glm or lrm (Design) for ordered factor variables
Dear useR's, I was comparing results for a logistic regression model between different library's. themodel formula is arranged as follows: response ~ (intercept) + value + group OR: glm( response ~ (intercept) + value + group , family=binomial(link='logit')) lrm( response ~ (intercept) + value + group ) ROC( from = response ~ (intercept) + value + group , plot='ROC') the response is a binary vaiable, the independent predictor 'value' is a continuous variable, and the grouping factor is a ordered factor (with 5 levels (25,50,100,200,400)) When I compare the GLM model with the ROC model and the LRM model setting 'group' as factor variable, the resulting coefficients are similar to eachother. When I set 'group' as an ordered factor variable (as it should be) the GLM model with the ROC model coefficients are still comparable, but the LRM coefficients are completely different. I have looked up the Design package, and there is a function 'cr.setup', which sets up an ordinal logistic response, this is however not the case here. the model hase a binary response (0 or 1), a continuos predicter and a ordered grouping factor. Does anybody know what I am doing wrong ? Thanks for you time, Tom Disclaimer: click here [[alternative HTML version deleted]]