Fixes and error messages for models with multiple interaction terms#17
Open
SamDeCraemer wants to merge 11 commits intoandjar:mainfrom
Open
Fixes and error messages for models with multiple interaction terms#17SamDeCraemer wants to merge 11 commits intoandjar:mainfrom
SamDeCraemer wants to merge 11 commits intoandjar:mainfrom
Conversation
Make sure baseline code works by supplying get only with the first effect term (get cannot work with a vector of length >1)
Allows prediction to work even when more than one grouping or confounding variable has interactions with the time variable. The predictions exclude main and interaction effects (eg. predictions for reference level of these) from other variables than selected effect variables as intended before.
Final updates to code to make it work for models with multiple interaction terms and have some better error messages explaining why certain bugs occur in these usecases.
Fixed a bug that caused prediction values to be switched if the levels of the stratification variable were not in alphabetical order
Warns in bootstrap validation runs if groups:time combinations have <10 participants, attempts to resample when one group:time combination had less than 2 samplings.
Forgot to add some lines of code to version
Kept one change in get_predictions() out of code as conflicting and in own usecase results in nonsense output, did not test if gets solved or caught. Put comment in code there.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I tried to apply the package on a usecase where multiple variables have meaningful interactions with time, and had to make some changes to be able to get correct effect plots and marginal means plots. Perhaps my changes could be the basis for some added functionality for this.
I also added an error message for cases where interaction terms are named differently in the model and when trying to construc the effect matrices. Correctly ordering the variables in the model formula and effect terms avoids the issues, fixing the code to allow any order was too complex for the time I had.