I am producing a summary tables for health variables. There are some conditional variables that only have observations for when a value of another variable has been selected: a factor variable with types of respiratory support if a patient has answered “yes” to if they had received it.
My problem is, a single table generated using “table1” will give the incorrect number of missing data for the type of respiratory support, as it includes patients who also answered “no” to “have they received respiratory support”.
I want to know if it is possible to summarise the data for those who only answered “yes” in the table1 function.