Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SE Calculations for as.lmitt vs. lmitt #97

Open
jwasserman2 opened this issue Feb 1, 2023 · 10 comments
Open

SE Calculations for as.lmitt vs. lmitt #97

jwasserman2 opened this issue Feb 1, 2023 · 10 comments

Comments

@jwasserman2
Copy link
Collaborator

  1. DirectAdjusted objects should have a slot indicating whether it was generated using lmitt or as.lmitt.
  2. When calling vcovDA on a DirectAdjusted object generated using as.lmitt, return the full covariance matrix if model-based SE's are called for, otherwise error.
@jwasserman2
Copy link
Collaborator Author

jwasserman2 commented Feb 1, 2023

  • DirectAdjusted objects have a slot indicating whether they were generated using lmitt or as.lmitt
  • vcovDA called on a DirectAdjusted object generated using as.lmitt errors when design-based SE's are called for
  • vcovDA called on a DirectAdjusted object generated using as.lmitt returns the full covariance matrix when model-based SE's are called for

@josherrickson
Copy link
Collaborator

Slot name is design_based_eligible (open to alternatives). Logical FALSE if created via as.lmitt or lmitt.lm; TRUE if created via lmitt.formula.

@benthestatistician
Copy link
Contributor

How about lmitt_fit for the slot name? Maybe less potential for confusion than with design_based_eligible, which may not be evocative when our focus is elsewhere than the design based/model based distinction. I'm open to alternatives too.

@josherrickson
Copy link
Collaborator

That was actually the slot name I first used, but I thought a logical would be more straightforward to use in the future (rather than always having to check if (object@lmitt.fit == "lmitt").

@josherrickson
Copy link
Collaborator

josherrickson commented Feb 2, 2023

I guess it could be lmitt_fit = TRUE in lmitt() and lmitt_fit = FALSE in as.lmitt()? Still feels a bit wonky. internal_fit?

edit: fit_with_lmitt? lmitt_called? direct_lmitt?

@benthestatistician
Copy link
Contributor

lmitt_fitted?

josherrickson added a commit that referenced this issue Feb 2, 2023
@jwasserman2
Copy link
Collaborator Author

@xinhew0708 I think you can address the remaining two check-boxes on this issue when you create your design-based variance estimation function. Or you can let me know and I can push a commit to your branch addressing them

@benthestatistician
Copy link
Contributor

(I would have thought that the second of those to-do's would fall more naturally in your court, @jwasserman2. I.e.

  • vcovDA called on a DirectAdjusted object generated using as.lmitt returns the full covariance matrix when model-based SE's are called for

Of course may be missing something. Or lots of things!)

@jwasserman2
Copy link
Collaborator Author

@benthestatistician the third checkbox is already implemented, so it's more of an issue of not breaking that when addressing the second checkbox. Should have made that clearer

@josherrickson josherrickson removed their assignment Apr 13, 2023
@jwasserman2 jwasserman2 removed their assignment Jun 8, 2023
@xinhew0708
Copy link
Collaborator

Implemented checkbox 2 in function .vcov_DB0 in the design branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants