Q1. Say, you are exploring the relationship between A (a binary treatment variable) and Y (a continuous outcome variable), adjusting for confounders. From the literature, two confounders L1 and L2 are identified. Which code could be used to run the regression analysis in R? (select ALL that apply)
Q2. In Q1, a mediator (M1) is also identified from the literature. Which code could be used to run the regression analysis in R to estimate the total effect of A on Y?
Q3. In Q2, say, M1 is actually a collider than a mediator. How could you fit the model in this case?
Q4. In Q2, say, M1 is an instrumental variable. How could you fit the model when aiming to estimate the effect of A on Y?