Closed josherrickson closed 1 year ago
I think I understand what you're running into. These changes make sense. I don't think we need to use it in SandwichLayerVariance.R
though because we force users to have the columns we need to grab in the original dataframe. So the default expand.model.frame
should suffice.
With the absorb branch pulled in, this is now live. I've included a test which will flag if stats::expand.model.frame()
changes such that it no longer matches flexida:::expand.model.frame.DA()
(sans my modifiations).
@jwasserman2 I'm running into an issue where
stats::expand.model.frame()
isn't working as expected becauselmitt()
is producing a model whose terms are not found in itsdata=
argument.I've created a
flexida:::.expand.model.frame.DA
function which is basically a clone ofstats::expand.model.frame()
but fixes this issue.It's not ready for primetime yet, but I pushed it onto a branch and mostly wanted your eyes on its inclusion in R/SandwichLayerVariance.R to make sure that I'm replacing
stats::expand.model.frame()
withflexida:::.expand.model.frame.DA()
appropriate, and explicitly not replacing in cases where it's not operating on a DA object.