# Can I run a regression when both independent and dependent variables are all dichotomous?

I have conducted a survey where all my questions are asked in a dichotomous manner (Yes/No).

Eg IV:"Are you a smoker?", "Are you obese", "Is your gender male/Female" etc. DV: "Have you ever had a stroke?"

Therefore both my dependent variable and independent variables are all dichotomous(Binary= measured in 0s and 1s).

My question is, is it appropriate to run a regression to determine the independent variables that drives the dependent variable given the fact that every single one of my variables (both dependent and independent) are dichotomous in nature?

If so, what kind of regression is the most appropriate? (Logistic regression?) and is there anything I should do to make the regression model more accurate?

I have rudimentary understanding of statistics and regression modelling and would be so grateful if someone would point me in the right direction.

In this case, you are relating binary properties of a person (answers to questions) to binary outcome (stroke/no stroke). A good place to start is to formulate this as a logistic regression problem, since it will constrain your dependent variable to be between 0 and 1. The result can be interpreted as the probability that the person will have a stroke given their answers to the survey. (Assumes we code "Yes=1, No=0").

Of course, you will need to (a) ensure your sample was representative of the group you intend to use it on (or of the general population being studied) and (b) cross-validate your data to see how robust your findings are.

• Thank you for your reply. So, the fact that all of my independent variables are also binary is not an issue? May 31 '16 at 5:03
• @Aiden nope, not an issue. Categorical variables are used all the time in regression. You use "dummy coding" to capture their effects as fixed adjustments to the regression line/curve.
– user75138
May 31 '16 at 5:12
• Thank you :). Just a final question, is there a difference between having binary IVs and continuous IVs in terms of how well it makes the model work? Has it been proven in theory that having continuous IVs is better than having binary IVs in a regression model? Jun 1 '16 at 7:40
• @Aiden your variables are meant to reflect your research object...if your problem does not vary continuously, then what is the point of using continuous IVs? The model will work equally well/poorly in either case. NOTE: Any finite sample can be interpreted as coming from a discrete random variable (notably, one that has the sample's empirical CDF), so the issue of whether the variables are "truly" continuous is not overly important. For example, each variable in a linear regression is simply multiplied by a coefficient, regardless of its value. Same applies to variables that are binary.
– user75138
Jun 1 '16 at 13:34

I would look at the model both ways: continuous variables as IVs (no binary recoding), and then binary variables as IVs (binary coding), and compare the logistic regression pseudo r-squared and concordance for the two models.

• Welcome to the site. How does this answer the question ? The OP clearly states that all variables are binary. There can be no recoding. Mar 26 '19 at 15:55