8.9 Summary of special cases
There were a number of places in this chapter where there was a special case regarding how to handle a situation. The list below serves as a reminder.
- Replace
NA
weights with 0 in a data management step before specifying the survey design. - Use
subset()
to create a design for a domain (subgroup) analysis. This was needed for the following situations:- Subsetting on complete cases when creating a Table 1 to correspond to your regression analysis. But if you are not creating a Table 1, there is no need to use a complete case analysis.
- Filtering out zero weights to avoid an error in some
survey
functions (e.g.,svycoxph()
). - Subgroup analyses.
- If you add/remove/change any variables, re-specify the design (and subset, if any).
tbl_regression()
does not have an option to change the DF for other than the Type III tests. If you want to use the design DF throughout, create the table, export, and replace CIs and p-values with values from functions that used the design DF.