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

vcovDA's applicable to paired assignment, w/ illustrative vignette #67

Open
4 tasks
benthestatistician opened this issue Sep 8, 2022 · 6 comments · May be fixed by #179
Open
4 tasks

vcovDA's applicable to paired assignment, w/ illustrative vignette #67

benthestatistician opened this issue Sep 8, 2022 · 6 comments · May be fixed by #179
Assignees

Comments

@benthestatistician
Copy link
Contributor

  • Review econometric lit for advice re translation to "clusters" of pairs vs paired units
  • Decide default design-based accommodation
  • Implementation
  • Brief end-user oriented vignette, demonstrating our semantics, explaining decisions being made implicitly and (as appropriate) illustrating options offered with our vcovDA calcs.
@benthestatistician
Copy link
Contributor Author

(Xinhe and Josh, pls don't hesitate to update & add appropriate detail to issue statement.)

@benthestatistician
Copy link
Contributor Author

The 2 papers I shared w/ @jwasserman2 today, as sources about the econometric conventional wisdom regarding sandwich estimation of covariance after paired assignment of clusters:

@benthestatistician
Copy link
Contributor Author

@jwasserman2 and I had a brief discussion today of the implementation of logic deciding which flavor of design-based variance estimator should be applied in which strata. This post is a followup to that discussion.

It would be useful for this purpose to have abstracted a table from the Design tallying the numbers of assignment unit by block, e.g.

Condi tion
Block C T
B1 1 3
B2 2 2

I promised I'd poke around for some related code elsewhere. Found it not to exist in the form that I had remembered. But I'll point out that flexida::treatment_table() is doing something related and is perhaps adaptible to this purpose.

@josherrickson
Copy link
Collaborator

josherrickson commented Oct 20, 2022

Edit: Nevermind I was completely misremembering how that function worked. I do agree that a more generic table'ing function could be useful.

@josherrickson
Copy link
Collaborator

I expanded treatment_table into the new dtable() function (alias'd to design_table() for now but I'm considering removing that).

dtable(design, "treatment") replicates the existing functionality of treatment_table(), but now supports e.g. dtable(design, "t", "b") to obtain the table you drew above.

> data(simdata)
> des <- rct_design(z ~ uoa(cid1, cid2) + block(bid), data = simdata)
> dtable(des, "tr", "bl")
      treatment
blocks 0 1
     1 3 1
     2 2 1
     3 1 2

(The 2nd and 3rd arguments, x and optionally y, match against the full names "treatment", "blocks", etc, so x = "tre" for example is valid.)

@jwasserman2
Copy link
Collaborator

Thoughts on some of the implementation here, specifically the "cluster level" dispatch, have been updated by #85

@jwasserman2 jwasserman2 linked a pull request Nov 5, 2022 that will close this issue
@jwasserman2 jwasserman2 removed a link to a pull request Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants