-
Notifications
You must be signed in to change notification settings - Fork 1
Structure storage and access
Josh Errickson edited this page Jul 10, 2025
·
2 revisions
| input | storage | has_binary_treatment |
|---|---|---|
| Numeric 0/1 only | integer | TRUE |
| Numeric NOT 0/1 only | integer | FALSE |
| factor with only 0/1 levels | factor | FALSE |
| ordinal with only 0/1 levels | ordered | FALSE |
| factor NOT 0/1 levels only | factor | FALSE |
| ordinal NOT 0/1 levels only | ordered | FALSE |
| factor with string levels (2 levels) | factor | FALSE |
| ordinal with string levels (3 levels) | ordered | FALSE |
| character (2 levels) | character | FALSE |
| character (more than 2 levels) | character | FALSE |
| logical | logical | TRUE |
| conditional (o > 2) | logical | TRUE |
| conditional (z == 1) | logical | TRUE |
All input types can optionally include NA, either in the direct treatment
variable, or as the result of the dichotomization.
If has_binary_treatment() column is FALSE, Design will require a
dichotomization before weights can be created. Note that in general
has_binary_treatment() will return TRUE in the cases above, or in any case
when there exists a dichotomization.
Note that these are all treated the same.
| inputs | storage |
|---|---|
| numeric | numeric |
| factor | character |
| ordered | character |
| character | character |
| inputs | storage 1 | storage 2 |
|---|---|---|
| numeric + numeric | integer | integer |
| numeric + factor | character | character |
| numeric + character | character | character |
| numeric + ordered | character | character |
| factor + numeric | character | character |
| factor + factor | character | character |
| factor + character | character | character |
| factor + ordered | character | character |
| character + numeric | character | character |
| character + factor | character | character |
| character + character | character | character |
| character + ordered | character | character |
| ordered + numeric | character | character |
| ordered + factor | character | character |
| ordered + character | character | character |
| ordered + ordered | character | character |