-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip data validation to speed up generation
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4e29cd5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only situation where I anticipate this might be risky is when factor variables are involved as levels should not be dropped/reordered. Should be easy to test by simulating data from something with an intermediate factor variable with some low probability outcomes to ensure they are all not present in every generation.
E.g.
(factor_outcome ~ x) + (y ~ factor_outcome)
4e29cd5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think this is safe -
brms
should always keep the original data/fit structure as a reference and not reorder anything in posterior predict.4e29cd5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is what I thought! However, after doing some quick tests, it seems that factor responses are returned as a numeric vector +
levels
attribute but no factor class, sobrms
won't accept its own output in thebrms_full_ppred
loop. And if two or more responses are requested, it even drops the levels. Of course this is something to be fixed from thebrms
side, but just heads up in case some error pops up around this. As a workaround, I found it is possible to use a factor where the level names are exactly the numbers used to encode values.Luckily since this is only a problem when generating data with something depending on a factor, the introduction of
brms_full_ppred
toSBC
should not break anything that already worked previously.