For the implementation of a project, we have been following household access to services in two groups of villages, one an intervention group (I) and one a control group (C). Access as a Yes/No variable was collected before and after an intervention with an interval of five years. The sample of households in each group of villages can be considered random and self-weighted.
Given we have four variables as below:
I_before n=544 households
I_after n=547 households unpaired as it is difficult to find the same household back after 5 years
C_before n=253 households
C_after n=257 households unpaired as well
How would the command in R look like to do the analysis using the above variable names?
Thanks a lot for any help