harrelfe / rms

Regression Modeling Strategies
https://hbiostat.org/R/rms
Other
172 stars 48 forks source link

validate() not working for lrm() #73

Open santsang opened 5 years ago

santsang commented 5 years ago

Hi Professor Harrel

I could perform validate() on the orm() object, not the lrm() object. The latter gives me this message:

Error in predab.resample(fit, method = method, fit = lrmfit, measure = discrim, : A training sample has a different number of intercepts (3) than the original model fit (4). You probably fit an ordinal model with sparse cells and a re-sample did not select at least one observation for each value of Y. Add the argument group=y where y is the response variable. This will force balanced sampling on levels of y.

Any possible help is very much appreciated.

All the best

Sandro