I'm new to learning R and have a few questions about running multiple linear regressions. I need to run regressions using multiple dependent variables while using the same set of independent & control variables. I've tried to do this using cbind() but the problem of using cbind() is it runs regressions using observations that do not have missing data in any of the dependent variables. As there are a different number of missing values in each dependent variable, what I would like to do is to run regressions on observations that have non-missing values in each dependent variable on which the regressions are run, not the whole set of dependent variables.
Also, since my methods design is regression discontinuity, I need to run the same set of regressions (using multiple dependent variables) in different bandwidths. How can I incorporate this factor into coding?
This is the code I ran using cbind():
sample_bw90<-subset(sample4, runningvar>-90 & runningvar<90)
sample_bw120<-subset(sample4, runningvar>-120 & runningvar<120)
As you can see, I ran regressions just separately for each bandwidth 90 and 120.
So my questions are: First, how can I run regressions using multiple dependent variables and use observations that have non-missing values in each dependent variable on which the regressions are run? Second, how can I run the same set of regressions in each bandwidth? Is there any way I can include this in the code?
Thank you in advance for your help!