# Cannot run Predict on a lrm output

**URL:** <https://discourse.datamethods.org/t/cannot-run-predict-on-a-lrm-output/15529>\
**Category:** modeling strategy\
**Tags:** rms\
**Created:** [June 6, 2024, 7:18am UTC](https://discourse.datamethods.org/t/cannot-run-predict-on-a-lrm-output/15529 "2024-06-06T07:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laimei](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/laimei/32/4603_2.png) [@Laimei](https://discourse.datamethods.org/u/Laimei)\
**Post date:** [June 6, 2024, 7:18am UTC](https://discourse.datamethods.org/t/cannot-run-predict-on-a-lrm-output/15529/1 "2024-06-06T07:18:16Z")

</div>

Hello,

I fitted a logistic regression model using `lrm` some days back and computed predictions using both `rms::Predict` and `stats::predict` with no problems. However, I have been having problems since yesterday with the following message

Error in reformulate(attr(termobj, “term.labels”)[-dropx], response = if (keep.response) termobj[[2L]], : ‘termlabels’ must be a character vector of length at least one

Using the `predict` in the stats package returned the same error. Anyone else has the same experience?

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [June 6, 2024, 7:50pm UTC](https://discourse.datamethods.org/t/cannot-run-predict-on-a-lrm-output/15529/2 "2024-06-06T19:50:06Z")

</div>

Hi Lainei - questions about the `rms` package go in [datamethods.org/rms](http://datamethods.org/rms) - please copy this question there as a reply to the last reply and I’ll remove it here. Please also include the simplest code example that fails. That will help me debug. Thanks.
