.extract_model_data()
: Warn that arguments wrhs
and orhs
are ignored
#1575
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds warnings that arguments
wrhs
andorhs
are currently ignored by.extract_model_data()
(the workhorse function forextract_model_data()
defined inget_refmodel.brmsfit()
). This is relevant forprojpred::proj_linpred()
,projpred::proj_predict()
, andprojpred:::predict.refmodel()
: When using an rstanarm reference model, it would be possible to specify weights and offsets in these 3 functions via argumentsweightsnew
andoffsetnew
, respectively. When using a brms reference model, these arguments are ignored (weights and offsets are fetched fromnewdata
, as brms does at other places, too). So far, this has only been documented at?get_refmodel.brmsfit
. With this PR, warnings are thrown to increase awareness.Illustration:
When running the tests with this PR, I received the following error, which doesn't seem to be related to projpred and this PR, though: