Closed johnnybonney closed 2 years ago
Sorry for the hold up on all the other issues. This one was tricky to resolve because I had to revisit the code for parsing. But this is done!
We now also allow for as-is interactions like, I(black * samesex == 1):uSplines(...)
.
The other approach---and probably more robust since it avoids all the parsing code---is just to create a new variable.
e.g.,
AE[, black.samesex := black * samesex]
then use black.samesex:uSplines(...)
in the MTR expressions.
This might be related to the fix for #211.
If I interact an as-is function of a covariate with a
uSpline
, I get a parsing error. Here is a simple example:returns the error
If I remove the interactions, the error doesn't appear. Or, if I replace the
uSplines
with justu
, the error disappears.If I replace the MTR specification with
then I get a different error:
If I replace
I(black == 1)
withblack
, then this error disappears and everything runs as expected.