I added a conditional statement to getConstraints.R. If there are categorical-categorical interactions, I check that the props argument is NULL. If it is NULL, then earlier in the function we set pi_hat to the empirical proportions, so we are good to go. If it is not NULL, the code throws an error.
I also added two corresponding tests to test-lmabc.R. At a later time we should develop a complete test suite for getConstraints.R and getFullDesign.R, and these two tests should be just a starting point in the eventual test-getConstraints.R file.
For now, the two simple tests pass, so I think we should be good to close this issue.
I added a conditional statement to
getConstraints.R
. If there are categorical-categorical interactions, I check that theprops
argument is NULL. If it is NULL, then earlier in the function we setpi_hat
to the empirical proportions, so we are good to go. If it is not NULL, the code throws an error.I also added two corresponding tests to
test-lmabc.R
. At a later time we should develop a complete test suite forgetConstraints.R
andgetFullDesign.R
, and these two tests should be just a starting point in the eventualtest-getConstraints.R
file.For now, the two simple tests pass, so I think we should be good to close this issue.