harrelfe / rmsb

Regression Modeling Strategies Bayesian
16 stars 2 forks source link

Error in predict.blrm ... may only specify one of kint, ycut leads to Problems with Predict() helper (as it always provides both). #7

Open mshunshin opened 9 months ago

mshunshin commented 9 months ago

The predict.blrm function will only let you supply one of kint and ycut, which in of itself is not much of a restriction.

However, the Predict() helper function will always supply both - preventing it from working with blrm fits.

Example

getHdata(titanic3)
dd <- datadist(titanic3); options(datadist='dd')
f <- blrm(age~fare, data=titanic3)

#Works
Predict(f, fare=1000)

#Doesn't work
Predict(f, fare=1000, kint=1)

#Works
predict(f, data.frame(fare=1000), kint=1)

#For reference - doesn't work
predict(f, data.frame(fare=1000), kint=1, ycut=1)
harrelfe commented 1 month ago

Matthew does this still fail?